Table of Contents

Class UpdateBuffer

Namespace
Bonsai.Audio
Assembly
Bonsai.Audio.dll

Represents an operator that updates the sample data of the specified audio buffer.

public class UpdateBuffer : Sink<Mat>
Inheritance
UpdateBuffer
Inherited Members

Properties

BufferName

Gets or sets the name of the buffer to update.

[TypeConverter(typeof(BufferNameConverter))]
public string BufferName { get; set; }

Property Value

string

DeviceName

Gets or sets the name of the audio device used for playback.

[TypeConverter(typeof(PlaybackDeviceNameConverter))]
public string DeviceName { get; set; }

Property Value

string

SampleRate

Gets or sets the sample rate, in Hz, used to playback the buffer data.

public int SampleRate { get; set; }

Property Value

int

Methods

Process(IObservable<Mat>)

Updates the data of the specified audio buffer using an observable sequence of buffered samples.

public override IObservable<Mat> Process(IObservable<Mat> source)

Parameters

source IObservable<Mat>

A sequence of Mat objects representing the samples used to fill the buffer with audio data.

Returns

IObservable<Mat>

An observable sequence that is identical to the source sequence but where there is an additional side effect of filling the buffer with audio data.

Remarks

This operator only subscribes to the source sequence after initializing the audio context on the specified audio device.