PushAudioInputStream class
Represents memory backed push audio input stream used for custom audio input configurations.
- Extends
Methods
close() | Closes the stream. |
create(Audio |
Creates a memory backed PushAudioInputStream with the specified audio format. |
write(Array |
Writes the audio data specified by making an internal copy of the data. |
Inherited Methods
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()
Closes the stream.
function close()
create(AudioStreamFormat)
Creates a memory backed PushAudioInputStream with the specified audio format.
static function create(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 push audio input stream being created.
write(ArrayBuffer)
Writes the audio data specified by making an internal copy of the data.
function write(dataBuffer: ArrayBuffer)
Parameters
- dataBuffer
-
ArrayBuffer
The audio buffer of which this function will make a copy.
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