Runtime loader for the prebuilt librockbox_ffi shared library, built on the Java Foreign Function & Memory API (JEP 454, stable since JDK 22).
Nothing is linked at build time: the library is located at runtime and every function is bound to a MethodHandle downcall. This mirrors include/rockbox_ffi.h — keep the descriptors in sync with the C ABI.
Runtime loader for the prebuilt librockbox_ffi shared library, built on the Java Foreign Function & Memory API (JEP 454, stable since JDK 22). Nothing is linked at build time: the library is located at runtime and every function is bound to a MethodHandle downcall. This mirrors include/rockbox_ffi.h — keep the descriptors in sync with the C ABI.
The DSP pipeline: EQ, tone, surround, compressor, ReplayGain, resampler.
The underlying dsp_config is a process-wide singleton, so only one DSP handle
may exist at a time and it must be used from one thread. A handle is an opaque
MemorySegment; every function takes it as the first argument. Free it with
free (or use with-dsp).
The DSP pipeline: EQ, tone, surround, compressor, ReplayGain, resampler. The underlying dsp_config is a process-wide singleton, so only one DSP handle may exist at a time and it must be used from one thread. A handle is an opaque MemorySegment; every function takes it as the first argument. Free it with `free` (or use `with-dsp`).
Symbolic names for the small-integer enums in the C ABI. Pass either the keyword (resolved here) or the raw int to the dsp/player functions.
Symbolic names for the small-integer enums in the C ABI. Pass either the keyword (resolved here) or the raw int to the dsp/player functions.
Audio file metadata parsing.
Audio file metadata parsing.
Play an audio file through the real output device.
Run: mise exec -- clojure -M:play [/path/to/audio]
Play an audio file through the real output device. Run: mise exec -- clojure -M:play [/path/to/audio]
Queue-based player with native ReplayGain and Rockbox crossfade.
A player owns a live audio output device and a background engine thread —
construct it only where an output device exists. A handle is an opaque
MemorySegment; every function takes it as the first argument. Free it with
free (or use with-player).
ReplayGain mode here uses the player values (rockbox.ffi.enums/replaygain-mode:
:off :track :album) — distinct from the DSP encoding.
Queue-based player with native ReplayGain and Rockbox crossfade. A player owns a live audio output device and a background engine thread — construct it only where an output device exists. A handle is an opaque MemorySegment; every function takes it as the first argument. Free it with `free` (or use `with-player`). ReplayGain `mode` here uses the *player* values (rockbox.ffi.enums/replaygain-mode: :off :track :album) — distinct from the DSP encoding.
End-to-end smoke test for the Clojure bindings.
Run: mise exec -- clojure -M:smoke
End-to-end smoke test for the Clojure bindings. Run: mise exec -- clojure -M:smoke
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |