PullAudioInputStream class

Represents audio input stream used for custom audio input configurations.

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).

Inherited Methods

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): PullAudioInputStream

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 (Required if format is not 16 kHz 16bit mono PCM).

Returns

The push audio input stream being created.

Inherited Method Details

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): PullAudioInputStream

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 (Required if format is not 16 kHz 16bit mono PCM).

Returns

The audio input stream being created.

Inherited From AudioInputStream.createPullStream

createPushStream(AudioStreamFormat)

Creates a memory backed PushAudioInputStream with the specified audio format.

static function createPushStream(format?: AudioStreamFormat): PushAudioInputStream

Parameters

format
AudioStreamFormat

The audio data format in which audio will be written to the push audio stream's write() method (Required if format is not 16 kHz 16bit mono PCM).

Returns

The audio input stream being created.

Inherited From AudioInputStream.createPushStream