Class AudioWriter
Represents an operator that writes a sequence of buffered samples into an uncompressed RIFF/WAV file.
public class AudioWriter : FileSink<Mat, RiffWriter>
- Inheritance
-
AudioWriter
- Inherited Members
Properties
SampleRate
Gets or sets the sample rate of the input signal, in Hz.
public int SampleRate { get; set; }
Property Value
Methods
CreateWriter(string, Mat)
When overridden in a derived class, creates the writer over the specified
fileName
that will be responsible for handling the input elements.
protected override RiffWriter CreateWriter(string fileName, Mat input)
Parameters
fileName
stringThe name of the file on which the elements should be written.
input
MatThe first input element that needs to be pushed into the file.
Returns
- RiffWriter
The writer that will be used to push elements into the file.
Write(RiffWriter, Mat)
Writes a sample buffer into the WAV file.
protected override void Write(RiffWriter writer, Mat input)
Parameters
writer
RiffWriterThe RiffWriter used to write data into the WAV file.
input
MatA Mat object containing the audio samples to write into the file.