PullAudioInputStreamCallback class

An abstract base class that defines callback methods (read() and close()) for custom audio input streams).

Methods

close()

Closes the audio input stream.

read(ArrayBuffer)

Reads data from audio input stream into the data buffer. The maximal number of bytes to be read is determined by the size of dataBuffer.

Method Details

close()

Closes the audio input stream.

function close()

read(ArrayBuffer)

Reads data from audio input stream into the data buffer. The maximal number of bytes to be read is determined by the size of dataBuffer.

function read(dataBuffer: ArrayBuffer): number

Parameters

dataBuffer

ArrayBuffer

The byte array to store the read data.

Returns

number

the number of bytes have been read.