AudioInputStream class
Represents audio input stream used for custom audio input configurations.
Methods
close() | Explicitly frees any external resource attached to the object |
create |
Creates a PullAudioInputStream that delegates to the specified callback interface for read() and close() methods. |
create |
Creates a memory backed PushAudioInputStream with the specified audio format. |
Method Details
close()
Explicitly frees any external resource attached to the object
function close()
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.
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.