The DSP pipeline: EQ, tone, surround, compressor, ReplayGain, resampler.
A DSP handle wraps the process-wide audio DSP singleton, so only one should be alive at a time. The handle is a NIF resource — it is freed by the BEAM garbage collector, no explicit close needed.
ReplayGain mode here uses the DSP-native values (see rg_mode/0):
0 track, 1 album, 2 shuffle, 3 off.
Summary
Functions
Convert a little-endian int16 binary to a list of samples.
Create a DSP for interleaved S16LE stereo at sample_rate Hz.
Run interleaved stereo S16 samples through the pipeline. Accepts and returns
a binary of little-endian int16 samples (use samples_to_binary/1 /
binary_to_samples/1 to convert lists).
Convert a list of int16 samples to a little-endian binary.
Configure one EQ band (0..9). Band 0 low shelf, 9 high shelf.
ReplayGain mode (see rg_mode/0), clipping prevention, preamp in dB.
Per-track gains in plain dB / peaks as linear amplitude. Pass nil for an
absent tag.
Native Q7.24 factors (the raw_* metadata fields); 0 = not tagged.
Types
Functions
Convert a little-endian int16 binary to a list of samples.
@spec flush(t()) :: :ok
@spec new(pos_integer()) :: t()
Create a DSP for interleaved S16LE stereo at sample_rate Hz.
Run interleaved stereo S16 samples through the pipeline. Accepts and returns
a binary of little-endian int16 samples (use samples_to_binary/1 /
binary_to_samples/1 to convert lists).
Convert a list of int16 samples to a little-endian binary.
Configure one EQ band (0..9). Band 0 low shelf, 9 high shelf.
@spec set_input_frequency(t(), pos_integer()) :: :ok
ReplayGain mode (see rg_mode/0), clipping prevention, preamp in dB.
@spec set_replaygain_gains( t(), number() | nil, number() | nil, number() | nil, number() | nil ) :: :ok
Per-track gains in plain dB / peaks as linear amplitude. Pass nil for an
absent tag.
Native Q7.24 factors (the raw_* metadata fields); 0 = not tagged.