Skip to main content
Version: 12 Dec 2024

BufferClip

Inherits from:
Clip,
IDisposable

Public Fields

BufferPosition


public int BufferPosition { get; set; }


Public Methods

BufferClip

public BufferClip(
MicCaptureType captureType,
int lengthSec,
int frequency
)

Parameters

TypeNameDescription
MicCaptureTypecaptureTypeThe type of mic input to capture.
intlengthSec
intfrequency

BufferClip

public BufferClip(
MicCaptureType captureType,
uint samplesLengthInSeconds,
uint sampleRate,
uint channels
)

Parameters

TypeNameDescription
MicCaptureTypecaptureTypeThe type of mic input to capture.
uintsamplesLengthInSeconds
uintsampleRate
uintchannels

AudioClip FlushToClip

public AudioClip FlushToClip()

int GetData

public int GetData(
float [] samples,
int readPosition,
out int nextReadPosition
)

Parameters

TypeNameDescription
float []samples
intreadPosition
out intnextReadPosition

int GetData

public int GetData(
float [] samples,
int readPosition
)

Parameters

TypeNameDescription
float []samples
intreadPosition

Protected Methods

OnReceiveSamples

Gets called from a thread when new samples are recorded.

protected virtual override void OnReceiveSamples(
float [] samples
)

Parameters

TypeNameDescription
float []samples

Reimplements: OnReceiveSamples


Public Events

OnReceivedSamples

public Action< float[]> OnReceivedSamples()