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.

read(ArrayBuffer)

Reads audio data from the internal buffer.

Inherited Methods

createPullStream()

Creates a memory backed PullAudioOutputStream with the specified audio format.

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

void format

Property Value

void

Method Details

close()

Closes the stream.

function close()

create()

Creates a memory backed PullAudioOutputStream with the specified audio format.

static function create(): PullAudioOutputStream

Returns

The push audio output stream being created.

read(ArrayBuffer)

Reads audio data from the internal buffer.

function read(dataBuffer: ArrayBuffer): Promise<number>

Parameters

dataBuffer

ArrayBuffer

An ArrayBuffer to store the read data.

Returns

Promise<number>

Audio buffer length has been read.

Inherited Method Details

createPullStream()

Creates a memory backed PullAudioOutputStream with the specified audio format.

static function createPullStream(): PullAudioOutputStream

Returns

The audio output stream being created.

Inherited From AudioOutputStream.createPullStream