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.
(free p)Free the native handle. Safe to call with nil.
Free the native handle. Safe to call with nil.
(new-player)(new-player config)Create a player. config overrides default-config (see the C ABI's
rb_player_new_with_config). Throws if no output device is available.
Create a player. `config` overrides `default-config` (see the C ABI's rb_player_new_with_config). Throws if no output device is available.
(set-crossfade p
mode
&
{:keys [fade-out-delay-ms fade-out-duration-ms fade-in-delay-ms
fade-in-duration-ms mix-mode]
:or {fade-out-delay-ms 0
fade-out-duration-ms 2000
fade-in-delay-ms 0
fade-in-duration-ms 2000
mix-mode :crossfade}})(set-replaygain p mode preamp-db prevent-clipping?)mode: rockbox.ffi.enums/replaygain-mode (:off :track :album).
`mode`: rockbox.ffi.enums/replaygain-mode (:off :track :album).
(status p)A snapshot of the player's status as a map (keyword keys).
A snapshot of the player's status as a map (keyword keys).
(with-player [sym & [config]] & body)Bind sym to a fresh player (optional config), run body, then free it.
Bind `sym` to a fresh player (optional `config`), run `body`, then free it.
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 |