reckfellENGINE

AudioEffectCapture

Exposes raw stereo bus frames through a ring buffer.

On this page
class AudioEffectCaptureReckfellSharpInherits AudioEffect

AudioEffectCapture copies the signal into a ring buffer without changing sound. Each Vector2 contains left and right float samples at one instant. Check available frame counts before reading; GetBuffer() consumes them.

Set BufferLength before instantiating the effect and read regularly. Overflow increases GetDiscardedFrames(). Capture observes its place in the chain, before that bus's fader/mute; it does not prove physical loudspeaker output.

Working example.

Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.

Constructors1

AudioEffectCaptureConstructor
# AudioEffectCapture
C#
public AudioEffectCapture();

Properties1

BufferLengthProperty
# BufferLength
C#
public float BufferLength { get; set; }

Requested buffer length in seconds. Set before attaching the effect: allocation happens on first initialization, and changing this property does not promise to resize an allocated queue. Distinct from the total recording cap.

Methods9

CanGetBufferbool
# CanGetBuffer
C#
public bool CanGetBuffer(int frames);

Returns true if at least frames samples are available to read in the internal ring buffer.

Parameters
NameTypeDefault
framesint—
Returns bool
ClearBuffervoid
# ClearBuffer
C#
public void ClearBuffer();

Removes currently unread queued frames. Does not clear your collected-frame list or reset GetDiscardedFrames; handle both in your own new-take logic.

GetBufferVector2[]
# GetBuffer
C#
public Vector2[] GetBuffer(int frames);

Reads and consumes the requested stereo PCM frames from the capture queue. Read regularly; this is not infinite storage or a one-call complete WAV export.

Parameters
NameTypeDefault
framesint—
frames

Frame count, not byte count. One Vector2 contains left and right channels. Request a positive available count and check the result.

Returns Vector2[]

Vector2[] of consumed frames. Insufficient data or a zero request returns an empty array; invalid size or an uninitialized buffer also reports an error.

GetBufferLengthfloat
# GetBufferLength
C#
public float GetBufferLength();
Returns float
GetBufferLengthFramesint
# GetBufferLengthFrames
C#
public int GetBufferLengthFrames();

Returns the total size of the internal ring buffer in number of samples.

Returns int
GetDiscardedFrameslong
# GetDiscardedFrames
C#
public long GetDiscardedFrames();

Reads accumulated frames discarded due to buffer overflow. Record a baseline for each take and track the difference. ClearBuffer does not reset this counter.

Returns long

Accumulated int64 loss count. Growth during a take means PCM continuity was broken.

GetFramesAvailableint
# GetFramesAvailable
C#
public int GetFramesAvailable();

Reads the current frame count available for consumption. Attach the effect to a bus first: effect instantiation initializes the buffer.

Returns int

Frame count, not bytes or seconds. This is the current queue, not the total length of a collected recording.

GetPushedFrameslong
# GetPushedFrames
C#
public long GetPushedFrames();

Returns the number of samples inserted from the audio bus.

Returns long
SetBufferLengthvoid
# SetBufferLength
C#
public void SetBufferLength(float bufferLengthSeconds);
Parameters
NameTypeDefault
bufferLengthSecondsfloat—
Reckfell Engine documentationBack to top ↑
QUICK LINKSGetting startedEntity hierarchyC# & .NET 10Scenes and prefabs
Reckfell guides and full API K
reckfellENGINE
RECKFELL ACCOUNT

Sign in

Sign in to your Reckfell account.

One account for the entire Reckfell platform.