New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@audio/aiff-decode

Package Overview
Dependencies
Maintainers
3
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@audio/aiff-decode

Decode AIFF/AIFF-C audio to PCM samples

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
3
Created
Source

aiff-decode

Decode AIFF and AIFF-C audio to PCM float samples.
Part of audio-decode.

Install

npm i @audio/aiff-decode

Usage

import decode from '@audio/aiff-decode'

let { channelData, sampleRate } = await decode(aiffBuffer)
// channelData: Float32Array[] (one per channel)
// sampleRate: number

Streaming

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

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

API

decode(src): Promise<AudioData>

Whole-file decode. Accepts Uint8Array or ArrayBuffer.

decoder(): Promise<AIFFDecoder>

Creates a decoder instance.

  • dec.decode(data) — decode chunk, returns { channelData, sampleRate }
  • dec.flush() — flush (returns empty — AIFF is stateless)
  • dec.free() — release resources

Formats

  • AIFF — 8, 16, 24, 32-bit signed integer PCM (big-endian)
  • AIFF-C — NONE/twos (BE PCM), sowt (LE PCM), fl32/fl64 (float), alaw, ulaw

License

MIT — krishnized

Keywords

aiff

FAQs

Package last updated on 15 Mar 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts