Receive interleaved audio frames to another thread, wait-free.

GC can happen during the initial construction of this object when hopefully no audio is being output. This depends on how implementations schedule GC passes. After the setup phase no GC is triggered on either side of the queue.

Constructors

Methods

  • Returns number

    Use availableRead() instead. This method is deprecated and will be removed in future versions.

  • Query the occupied space in the queue.

    Returns number

    The amount of samples that can be read with a guarantee of success.

  • Attempt to dequeue at most buf.length samples from the queue. This returns the number of samples dequeued. If greater than 0, the samples are at the beginning of buf.

    Care should be taken to dequeue a number of samples that is a multiple of the channel count of the audio stream.

    Parameters

    • buf: Float32Array

      A buffer in which to copy the dequeued interleaved audio frames.

    Returns number

    The number of samples dequeued.

MMNEPVFCICPMFPCPTTAAATR