Type alias RtAudioCallback

RtAudioCallback: ((output, input, nFrames, streamTime, status) => void)

A function that will be invoked when input data is available and/or output data is needed.

Type declaration

    • (output, input, nFrames, streamTime, status): void
    • Parameters

      • output: Uint8Array

        For output (or duplex) streams, the client should write nFrames of audio sample frames into this buffer. For input-only streams, this argument will be null.

      • input: Uint8Array

        For input (or duplex) streams, this buffer will hold nFrames of input audio sample frames. For output-only streams, this argument will be null.

      • nFrames: number

        The number of sample frames of input or output data in the buffers. The actual buffer size in bytes is dependent on the format and number of channels in use.

      • streamTime: number

        The number of seconds that have elapsed since the stream was started.

      • status: RtAudioStreamStatus

        If non-zero, this argument indicates a data overflow or underflow condition for the stream. The particular condition can be determined by comparison with the RtAudioStreamStatus flags.

      Returns void

Generated using TypeDoc