---
url: >-
  https://adk.nht.io/api/@nhtio/adk/batteries/media/engines/audio_decode/interfaces/AudioBufferLike.md
description: >-
  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.
---

# Interface: AudioBufferLike

Defined in: [src/batteries/media/engines/audio\_decode.ts:33](https://github.com/NHTIO/ADK/blob/v1.20260713.1/src/src/batteries/media/engines/audio_decode.ts#L33)

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](https://github.com/NHTIO/ADK/blob/v1.20260713.1/src/src/batteries/media/engines/audio_decode.ts#L41) |
|  `numberOfChannels?` | `number`                              | Channel count when the AudioBuffer-compatible shape is returned. | [src/batteries/media/engines/audio\_decode.ts:35](https://github.com/NHTIO/ADK/blob/v1.20260713.1/src/src/batteries/media/engines/audio_decode.ts#L35) |
|  `sampleRate`              | `number`                              | Sample rate of the decoded audio, in Hz. Present on both shapes. | [src/batteries/media/engines/audio\_decode.ts:37](https://github.com/NHTIO/ADK/blob/v1.20260713.1/src/src/batteries/media/engines/audio_decode.ts#L37) |

## Methods

### getChannelData()?

```ts
optional getChannelData(channel: number): Float32Array;
```

Defined in: [src/batteries/media/engines/audio\_decode.ts:39](https://github.com/NHTIO/ADK/blob/v1.20260713.1/src/src/batteries/media/engines/audio_decode.ts#L39)

Per-channel sample accessor on the AudioBuffer-compatible shape.

#### Parameters

| Parameter | Type     |
| --------- | -------- |
| `channel` | `number` |

#### Returns

`Float32Array`
