PullAudioOutputStream class

Represents memory backed push audio output stream used for custom audio output configurations.

Extends

Properties

format

Sets the format of the AudioOutputStream Note: the format is set by the synthesizer before writing. Do not set it before passing it to AudioConfig

Methods

close()

Closes the stream.

create()

Creates a memory backed PullAudioOutputStream with the specified audio format.

createPullStream()

Creates a memory backed PullAudioOutputStream with the specified audio format.

read(ArrayBuffer)

Reads audio data from the internal buffer.

Property Details

format

Sets the format of the AudioOutputStream Note: the format is set by the synthesizer before writing. Do not set it before passing it to AudioConfig

any format

Property Value

any

Method Details

close()

Closes the stream.

function close()

create()

Creates a memory backed PullAudioOutputStream with the specified audio format.

static function create()

Returns

The push audio output stream being created.

createPullStream()

Creates a memory backed PullAudioOutputStream with the specified audio format.

static function createPullStream()

Returns

The audio output stream being created.

read(ArrayBuffer)

Reads audio data from the internal buffer.

function read(dataBuffer: ArrayBuffer)

Parameters

dataBuffer

ArrayBuffer

An ArrayBuffer to store the read data.

Returns

Promise<number>

Audio buffer length has been read.