Class AudioReader
Represents an operator that generates a sequence of buffered audio samples from an uncompressed RIFF/WAV file.
public class AudioReader : Source<Mat>
- Inheritance
-
AudioReader
- Inherited Members
Properties
BufferLength
Gets or sets the length of the sample buffer, in milliseconds.
public double BufferLength { get; set; }
Property Value
FileName
Gets or sets the name of the WAV file.
[FileNameFilter("WAV Files (*.wav;*.wave)|*.wav;*.wave|All Files|*.*")]
public string FileName { get; set; }
Property Value
SampleRate
Gets or sets the sample rate, in Hz, used to playback the sample buffers. If it is zero, samples will be played at the rate specified in the RIFF/WAV file header.
public int SampleRate { get; set; }
Property Value
Methods
Generate()
Generates a sequence of buffered audio samples from the specified WAV file.
public override IObservable<Mat> Generate()
Returns
- IObservable<Mat>
A sequence of Mat objects representing audio sample buffers of a fixed length. See BufferLength.
Generate<TSource>(IObservable<TSource>)
Generates a sequence of buffered audio samples from the specified WAV file, where each new buffer is emitted only when an observable sequence emits a notification.
public IObservable<Mat> Generate<TSource>(IObservable<TSource> source)
Parameters
source
IObservable<TSource>The sequence containing the notifications used for emitting audio buffers.
Returns
- IObservable<Mat>
A sequence of Mat objects representing audio sample buffers of a fixed length. See BufferLength.
Type Parameters
TSource
The type of the elements in the
source
sequence.