Table of Contents

Method PlayBuffer

Namespace
Bonsai.Mixer
Assembly
Bonsai.Mixer.dll

PlayBuffer(Mat)

Plays an audio buffer as a one-shot source that is removed once it finishes playing.

public void PlayBuffer(Mat buffer)

Parameters

buffer Mat

A multi-dimensional array containing the sample data, where each row vector represents data from an individual channel to be mixed into the mixer output stream.

Remarks

At any one moment when the mixer context is playing, the data streamed to PortAudio is the sum of all sources being played.

Exceptions

ArgumentNullException

The buffer is null.

ArgumentException

The number of rows does not match the number of channels in the stream, the buffer contains no samples, or the sample depth is not 32-bit floating point.