# @audio/decode-aiff

> Decode AIFF/AIFF-C audio to PCM samples

Latest version **1.3.0** (published 2026-08-11) · MIT license · 0 weekly downloads

## Install

```sh
npm install @audio/decode-aiff
pnpm add @audio/decode-aiff
yarn add @audio/decode-aiff
bun add @audio/decode-aiff
```

## Health

**Score 70/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; recently updated; high maintenance score; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 1.3.0 |
| Published | 2026-08-11 |
| First published | 2026-04-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=18 |
| Dependencies | 0 |
| Unpacked size | 24.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 208 |
| Author | audiojs |
| Maintainers | jamen, dfcreative, dy |
| Keywords | aiff, aifc, audio, decode, decoder, pcm |

## Links

- npm: https://www.npmjs.com/package/@audio/decode-aiff
- Repository: https://github.com/audiojs/decode
- Homepage: https://github.com/audiojs/decode/tree/master/packages/decode-aiff#readme
- Issues: https://github.com/audiojs/decode/issues
- Funding: https://github.com/sponsors/audiojs
- npm.io page: https://npm.io/package/@audio/decode-aiff

## Alternatives

- [flatbuffers](https://npm.io/package/flatbuffers.md) — 6.0M weekly downloads
- [jwt-simple](https://npm.io/package/jwt-simple.md) — 259.5K weekly downloads
- [@exodus/patch-broken-hermes-typed-arrays](https://npm.io/package/@exodus/patch-broken-hermes-typed-arrays.md) — 28.5K weekly downloads
- [@native-to-anchor/buffer-layout](https://npm.io/package/@native-to-anchor/buffer-layout.md) — 12.2K weekly downloads
- [binary-parser-encoder](https://npm.io/package/binary-parser-encoder.md) — 5.3K weekly downloads

## Recent versions

- 1.3.0 (latest) — 2026-08-11
- 1.2.3 — 2026-07-14
- 1.2.2 — 2026-07-11
- 1.2.1 — 2026-07-10
- 1.2.0 — 2026-07-10
- 1.1.4 — 2026-07-09
- 1.1.3 — 2026-06-22
- 1.1.2 — 2026-06-11
- 1.1.1 — 2026-04-11
- 1.1.0 — 2026-04-05
- 1.0.0 — 2026-04-04

## README

# @audio/decode-aiff

Decode AIFF and AIFF-C audio to PCM float samples.

## Install

```
npm i @audio/decode-aiff
```

## Usage

```js
import decode, { decoder } from '@audio/decode-aiff'

let { channelData, sampleRate } = decode(aiffBytes)

let dec = decoder()
let result = dec.decode(chunk)
dec.free()
```

`decode()` and `decoder()` are synchronous.

## API

### `decode(src): AudioData`

Decode a complete `Uint8Array` or `ArrayBuffer`.

### `decoder(): AIFFDecoder`

Create a decoder instance.

- `dec.decode(data)`: decode a chunk.
- `dec.flush()`: decode buffered `ima4` or `GSM` data; otherwise return an empty result.
- `dec.free()`: release resources.

## Formats

- AIFF: 8, 16, 24, and 32-bit signed big-endian PCM.
- AIFF-C: `NONE`/`twos`, `sowt`, `fl32`, `fl64`, `alaw`, `ulaw`, `ima4`, and `GSM`.

## License

[ॐ](https://github.com/krishnized/license/) · [MIT](./LICENSE)

---
_Source: https://npm.io/package/@audio/decode-aiff · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
