PullAudioInputStream class

Extends

Methods

close()

Explicitly frees any external resource attached to the object

create(PullAudioInputStreamCallback, AudioStreamFormat)

Creates a PullAudioInputStream that delegates to the specified callback interface for read() and close() methods, using the default format (16 kHz 16bit mono PCM).

createPullStream(PullAudioInputStreamCallback, AudioStreamFormat)

Creates a PullAudioInputStream that delegates to the specified callback interface for read() and close() methods.

createPushStream(AudioStreamFormat)

Creates a memory backed PushAudioInputStream with the specified audio format.

Method Details

close()

Explicitly frees any external resource attached to the object

function close()

create(PullAudioInputStreamCallback, AudioStreamFormat)

Creates a PullAudioInputStream that delegates to the specified callback interface for read() and close() methods, using the default format (16 kHz 16bit mono PCM).

static function create(callback: PullAudioInputStreamCallback, format?: AudioStreamFormat)

Parameters

callback
PullAudioInputStreamCallback

The custom audio input object, derived from PullAudioInputStreamCustomCallback

format
AudioStreamFormat

The audio data format in which audio will be returned from the callback's read() method (currently only support 16 kHz 16bit mono PCM).

Returns

The push audio input stream being created.

createPullStream(PullAudioInputStreamCallback, AudioStreamFormat)

Creates a PullAudioInputStream that delegates to the specified callback interface for read() and close() methods.

static function createPullStream(callback: PullAudioInputStreamCallback, format?: AudioStreamFormat)

Parameters

callback
PullAudioInputStreamCallback

The custom audio input object, derived from PullAudioInputStreamCallback

format
AudioStreamFormat

The audio data format in which audio will be returned from the callback's read() method (currently only support 16 kHz 16bit mono PCM).

Returns

The audio input stream being created.

createPushStream(AudioStreamFormat)

Creates a memory backed PushAudioInputStream with the specified audio format.

static function createPushStream(format?: AudioStreamFormat)

Parameters

format
AudioStreamFormat

The audio data format in which audio will be written to the push audio stream's write() method (currently only support 16 kHz 16bit mono PCM).

Returns

The audio input stream being created.