Table of Contents

Class AudioWriter

Namespace
Bonsai.Audio
Assembly
Bonsai.Audio.dll

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

int

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 string

The name of the file on which the elements should be written.

input Mat

The 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 RiffWriter

The RiffWriter used to write data into the WAV file.

input Mat

A Mat object containing the audio samples to write into the file.