Class MixerSourceContext
Represents a single audio source playing as one voice over a mixer context.
public class MixerSourceContext
- Inheritance
-
MixerSourceContext
- Inherited Members
Remarks
A source maintains an ordered queue of audio buffers played back through a single read cursor, scaled by a source gain and an independent per-channel gain, each of which can vary over time. The source is an opaque handle created by the mixer and controlled by downstream operators that append buffers, set the gain, or stop playback.
Methods
- Append(Mat)
Appends an audio buffer to the end of the source playback queue.
- Pause()
Pauses playback of the source, holding its position until playback is resumed.
- Play()
Resumes playback of the source from its current position.
- SetChannelGain(float[], double)
Sets the per-channel gain of the source to a separate level for each output channel over the specified duration.
- SetGain(float, double)
Sets the source gain to a new level over the specified duration.
- Stop(double)
Stops playback of the source, fading the gain to silence over the specified duration before the source is removed from the mixer.