Liking cljdoc? Tell your friends :D

rockbox.ffi.decoder

Decode a local audio file to interleaved-stereo S16 PCM, one chunk at a time.

Wraps the Rockbox codec engine. The codec state is process-wide, so only one decoder may decode at a time — opening a second one blocks until the first is freed. A handle is an opaque MemorySegment; every function takes it as the first argument. Free it with free (or use with-decoder).

Decode a local audio file to interleaved-stereo S16 PCM, one chunk at a time.

Wraps the Rockbox codec engine. The codec state is process-wide, so only one
decoder may decode at a time — opening a second one blocks until the first is
freed. A handle is an opaque MemorySegment; every function takes it as the
first argument. Free it with `free` (or use `with-decoder`).
raw docstring

elapsed-msclj

(elapsed-ms p)

Playback position last reported by the codec, in milliseconds.

Playback position last reported by the codec, in milliseconds.
sourceraw docstring

finishedclj

(finished p)

[done code]: done is true once the track has ended; code is the exit status (0 = clean end, negative = codec error), valid only when done.

`[done code]`: `done` is true once the track has ended; `code` is the exit
status (0 = clean end, negative = codec error), valid only when `done`.
sourceraw docstring

freeclj

(free p)

Free the native handle. Safe to call with nil.

Free the native handle. Safe to call with nil.
sourceraw docstring

metadataclj

(metadata p)

Tags and stream properties (same shape as rockbox.ffi.metadata/read), as a map with keyword keys.

Tags and stream properties (same shape as `rockbox.ffi.metadata/read`),
as a map with keyword keys.
sourceraw docstring

next-chunkclj

(next-chunk p)

Next buffer of decoded PCM as [samples sample-rate], where samples is an interleaved stereo short-array. Returns nil at end of track (or after a codec error — see finished).

Next buffer of decoded PCM as `[samples sample-rate]`, where `samples` is an
interleaved stereo short-array. Returns nil at end of track (or after a codec
error — see `finished`).
sourceraw docstring

openclj

(open path)

Open a streaming decoder for the audio file at path.

Open a streaming decoder for the audio file at `path`.
sourceraw docstring

seek-msclj

(seek-ms p ms)

Request a seek to ms milliseconds.

Request a seek to `ms` milliseconds.
sourceraw docstring

with-decodercljmacro

(with-decoder [sym path] & body)

Bind sym to a fresh decoder for path, run body, then free it.

Bind `sym` to a fresh decoder for `path`, run `body`, then free it.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close