Table of Contents

Class EventBufferQuery

Namespace
NAudio.Sequencing
Assembly
NAudio.Core.dll

Stateless per-buffer event query — the dispatch math used by SequencedSampleProvider<T>, exposed as a standalone API for consumers that don't want to route events through a MixingSampleProvider (e.g. a VST3 instrument provider feeding events into a plugin's process() event input).

public static class EventBufferQuery
Inheritance
EventBufferQuery
Inherited Members

Remarks

Stateless by design: the caller supplies an arbitrary [startFrame, endFrameExclusive) range, so a host that pulls e.g. 4096 frames from WASAPI can split the work across multiple downstream process() calls if the plugin's max block size is smaller. The dispatcher receives each event with its effective absolute tick (after the position transform and, in a loop, after iteration translation) and a sample-accurate frame offset relative to startFrame. Queries are audio-thread friendly: they run over the timeline's lock-free immutable snapshot (see EventsInRangeSpan(long, long)) and perform no heap allocations.

Methods

Query<T>(EventTimeline<T>, ITempoMap, IPositionTransform, LoopRegion?, long, long, int, Action<SequencerEvent<T>, int>)

Invokes dispatcher once per event whose effective fire-frame lands inside [startFrame, endFrameExclusive).

public static void Query<T>(EventTimeline<T> timeline, ITempoMap tempoMap, IPositionTransform transform, LoopRegion? loop, long startFrame, long endFrameExclusive, int sampleRate, Action<SequencerEvent<T>, int> dispatcher)

Parameters

timeline EventTimeline<T>
tempoMap ITempoMap
transform IPositionTransform
loop LoopRegion?
startFrame long
endFrameExclusive long
sampleRate int
dispatcher Action<SequencerEvent<T>, int>

Type Parameters

T