Skip to content
Type

AudioSampleInit

Metadata used for AudioSample initialization.

ts
type AudioSampleInit = {
	data: AllowSharedBufferSource;
	format: AudioSampleFormat;
	numberOfChannels: number;
	sampleRate: number;
	timestamp: number;
};

Used by

Properties

data

ts
data: AllowSharedBufferSource;

The audio data for this sample.

format

ts
format: AudioSampleFormat;

The audio sample format. See sample formats

numberOfChannels

ts
numberOfChannels: number;

The number of audio channels.

sampleRate

ts
sampleRate: number;

The audio sample rate in hertz.

timestamp

ts
timestamp: number;

The presentation timestamp of the sample in seconds.

Released under the Mozilla Public License 2.0.