Table of Contents

Class AudioCapture

Namespace
Bonsai.Audio
Assembly
Bonsai.Audio.dll

Represents an operator that generates a sequence of buffered samples acquired from the specified audio capture device.

public class AudioCapture : Source<Mat>
Inheritance
AudioCapture
Inherited Members

Constructors

AudioCapture()

Initializes a new instance of the AudioCapture class.

public AudioCapture()

Properties

BufferLength

Gets or sets the length of the capture buffer, in milliseconds.

public double BufferLength { get; set; }

Property Value

double

DeviceName

Gets or sets the name of the capture device from which to acquire samples.

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

Property Value

string

SampleFormat

Gets or sets the format of capture buffer samples.

[TypeConverter(typeof(AudioCapture.SampleFormatConverter))]
public ALFormat SampleFormat { get; set; }

Property Value

ALFormat

SampleRate

Gets or sets the sample rate used by the audio capture device, in Hz.

public int SampleRate { get; set; }

Property Value

int

Methods

Generate()

Generates an observable sequence of buffered audio samples acquired from the specified audio capture device.

public override IObservable<Mat> Generate()

Returns

IObservable<Mat>

A sequence of Mat objects representing audio capture buffers of a fixed length. See BufferLength.