@ain1084/audio-frame-buffer - v0.2.1
    Preparing search index...

    Type Alias FrameBufferContext

    Context for an FrameBuffer. This context is returned by the createAudioFrameBufferContext function and is designed to be shared between threads, allowing safe and efficient audio data processing in multithreaded environments. It leverages a SharedArrayBuffer to enable thread-safe data access.

    type FrameBufferContext = {
        sampleBuffer: Float32Array;
        samplesPerFrame: number;
        totalReadFrames: BigUint64Array;
        totalWriteFrames: BigUint64Array;
        usedFramesInBuffer: Uint32Array;
    }
    Index
    sampleBuffer: Float32Array

    The shared buffer (based on SharedArrayBuffer) for audio data frames, enabling thread-safe data sharing across different threads.

    samplesPerFrame: number

    The number of samples per frame, representing the channel count.

    totalReadFrames: BigUint64Array

    A counter for the total number of frames read from the buffer.

    totalWriteFrames: BigUint64Array

    A counter for the total number of frames written to the buffer.

    usedFramesInBuffer: Uint32Array

    A counter that tracks the usage count of the frames in the buffer.