The published package bundles a prebuilt native library per platform. From a
repo checkout, point at your own build with
ROCKBOX_FFI_LIB.
Quick start
Decode a file to PCM
Decoder streams one audio file through the Rockbox codec engine, yielding
interleaved-stereo S16LE PCM (Int16Array) one chunk at a time — no output
device required. Same Metadata shape as metadata.read.
dec.seekMs(ms) and read the codec’s position with dec.elapsedMs().
API
Everything is fully typed — your editor has the details.metadata
Dsp — interleaved-S16LE-stereo processor. Construct with a sample rate,
feed it Int16Arrays, and close() (or using) when done.
Decoder — streaming file decoder. Construct with a path, pull PCM with
nextChunk(), and close() (or using) when done. Only one may decode at a
time (see Decode a file to PCM).
Player — queue, transport, crossfade, shuffle/repeat, the full DSP
chain, and status(). Every mutating method returns this, so calls chain
fluently (see the quick start); getters and close() return their own values.
Enums
Exported constant objects to pass to the setters above:
DspReplayGainMode, ReplayGainMode, CrossfadeMode, MixMode,
CrossfeedMode, InsertPosition, ChannelConfig, ChannelMode, EqPreset,
and RepeatMode.