Interface: AudioBufferLike
Defined in: src/batteries/media/engines/audio_decode.ts:33
The decoded shapes audio-decode resolves to. Some codecs return an AudioBuffer-compatible object (numberOfChannels + getChannelData); others (e.g. the wav path in Node) return a plain { channelData: Float32Array[], sampleRate } record. The engine normalizes both.
Properties
| Property | Type | Description | Defined in |
|---|---|---|---|
channelData? | Float32Array<ArrayBufferLike>[] | Raw per-channel sample arrays on the plain-record shape. | src/batteries/media/engines/audio_decode.ts:41 |
numberOfChannels? | number | Channel count when the AudioBuffer-compatible shape is returned. | src/batteries/media/engines/audio_decode.ts:35 |
sampleRate | number | Sample rate of the decoded audio, in Hz. Present on both shapes. | src/batteries/media/engines/audio_decode.ts:37 |
Methods
getChannelData()?
ts
optional getChannelData(channel: number): Float32Array;Defined in: src/batteries/media/engines/audio_decode.ts:39
Per-channel sample accessor on the AudioBuffer-compatible shape.
Parameters
| Parameter | Type |
|---|---|
channel | number |
Returns
Float32Array