Liking cljdoc? Tell your friends :D

rockbox.ffi.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).

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`).
raw docstring

eq-enableclj

(eq-enable p enable?)
source

flushclj

(flush p)
source

freeclj

(free p)

Free the native handle. Safe to call with nil.

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

new-dspclj

(new-dsp sample-rate)

Create a DSP pipeline for the given input sample rate (Hz).

Create a DSP pipeline for the given input sample rate (Hz).
sourceraw docstring

processclj

(process p samples)

Run interleaved stereo S16 samples (a short-array) through the pipeline. Returns a new short-array (length may differ — the resampler buffers).

Run interleaved stereo S16 `samples` (a short-array) through the pipeline.
Returns a new short-array (length may differ — the resampler buffers).
sourceraw docstring

set-channel-configclj

(set-channel-config p mode)
source

set-compressorclj

(set-compressor p threshold makeup-gain ratio knee release-time attack-time)
source

set-eq-bandclj

(set-eq-band p band cutoff-hz q gain-db)

Configure one EQ band (0..9). Band 0 is a low shelf, 9 a high shelf.

Configure one EQ band (0..9). Band 0 is a low shelf, 9 a high shelf.
sourceraw docstring

set-eq-precutclj

(set-eq-precut p db)
source

set-input-frequencyclj

(set-input-frequency p hz)
source

set-replaygainclj

(set-replaygain p mode noclip? preamp-db)

mode: rockbox.ffi.enums/dsp-replaygain-mode (:track :album :shuffle :off).

`mode`: rockbox.ffi.enums/dsp-replaygain-mode (:track :album :shuffle :off).
sourceraw docstring

set-replaygain-gainsclj

(set-replaygain-gains p
                      &
                      {:keys [track-gain-db album-gain-db track-peak album-peak]
                       :or {track-gain-db Float/NaN
                            album-gain-db Float/NaN
                            track-peak Float/NaN
                            album-peak Float/NaN}})

Per-track gains in plain dB / peaks as linear amplitude (1.0 = full scale). Omit any absent tag — it defaults to the ABI's NaN sentinel.

Per-track gains in plain dB / peaks as linear amplitude (1.0 = full scale).
Omit any absent tag — it defaults to the ABI's NaN sentinel.
sourceraw docstring

set-replaygain-gains-rawclj

(set-replaygain-gains-raw p track-gain album-gain track-peak album-peak)

Native Q7.24 linear factors (the raw_* fields from metadata), 0 = untagged.

Native Q7.24 linear factors (the raw_* fields from metadata), 0 = untagged.
sourceraw docstring

set-stereo-widthclj

(set-stereo-width p percent)
source

set-surroundclj

(set-surround p delay-ms balance fx1 fx2)
source

set-toneclj

(set-tone p bass-db treble-db)
source

set-tone-cutoffsclj

(set-tone-cutoffs p bass-hz treble-hz)
source

sine-stereoclj

(sine-stereo freq-hz seconds rate)
(sine-stereo freq-hz seconds rate amplitude)

Generate seconds of a sine as an interleaved stereo short-array.

Generate `seconds` of a sine as an interleaved stereo short-array.
sourceraw docstring

with-dspcljmacro

(with-dsp [sym sample-rate] & body)

Bind sym to a fresh DSP handle for sample-rate, run body, then free it.

Bind `sym` to a fresh DSP handle for `sample-rate`, 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