Class AudioPlayback
Represents an operator that plays a sequence of buffered samples to the specified audio device.
public class AudioPlayback : Sink<Mat>
- Inheritance
-
AudioPlayback
- Inherited Members
Properties
DeviceName
Gets or sets the name of the audio device used for playback.
[TypeConverter(typeof(PlaybackDeviceNameConverter))]
public string DeviceName { get; set; }
Property Value
SampleRate
Gets or sets the sample rate, in Hz, used to playback the audio buffers.
public int SampleRate { get; set; }
Property Value
SourceName
Gets or sets the optional name of the source used to playback the audio buffers.
[TypeConverter(typeof(SourceNameConverter))]
public string SourceName { get; set; }
Property Value
State
Gets or sets a value specifying the state to which the source should be set when queueing audio buffers.
public ALSourceState? State { get; set; }
Property Value
- ALSourceState?
Methods
Process(IObservable<Mat>)
Plays an observable sequence of buffered samples to the specified audio device.
public override IObservable<Mat> Process(IObservable<Mat> source)
Parameters
source
IObservable<Mat>A sequence of Mat objects representing the buffered audio samples to queue for playback on the specified audio device.
Returns
- IObservable<Mat>
An observable sequence that is identical to the
source
sequence but where there is an additional side effect of queueing the audio buffers for playback on the specified audio device.
Remarks
This operator only subscribes to the source
sequence after
initializing the audio context on the specified audio device.
Process(IObservable<Mat>, IObservable<AudioSource>)
Plays an observable sequence of buffered samples to all the specified audio sources.
public IObservable<Mat> Process(IObservable<Mat> dataSource, IObservable<AudioSource> audioSource)
Parameters
dataSource
IObservable<Mat>A sequence of Mat objects representing the buffered audio samples to queue for playback on all the active audio sources.
audioSource
IObservable<AudioSource>A sequence of AudioSource objects on which to queue the buffered audio samples for playback.
Returns
- IObservable<Mat>
An observable sequence that is identical to the
dataSource
sequence but where there is an additional side effect of queueing the audio buffers for playback on all the active audio sources.
Remarks
This operator only subscribes to the dataSource
sequence
after initializing the audio context on the specified audio device.