class
SushiDSP::IrLoader
Loads cabinet impulse responses and conditions them for convolution.
- Declared in
include/SushiDSP/io/IrLoader.hpp
Resamples to the host rate, truncates to a bounded length with a raised-cosine fade-out, and normalises the mid-band average magnitude to 0 dB so swapping IRs does not change perceived loudness. Control-thread only: allocates, throws, and touches the filesystem.
Static public member functions
static Ir load(const std::string &path, double target_sample_rate, const IrLoadOptions &options={})Loads an impulse response from a WAV file and conditions it.
Parameters
pathFilesystem path to the WAV file.
target_sample_rateSample rate the impulse response is needed at, in Hz.
optionsConditioning options.
Returns
The conditioned impulse response at target_sample_rate.
Exceptions
std::runtime_errorif the file cannot be opened or parsed.
static Ir prepare(std::vector< float > samples, double source_rate, double target_sample_rate, const IrLoadOptions &options={})Conditions in-memory samples through the same pipeline load() uses.
Parameters
samplesSource impulse response samples.
source_rateSample rate the samples were captured at, in Hz.
target_sample_rateSample rate the impulse response is needed at, in Hz.
optionsConditioning options.
Returns
The conditioned impulse response at target_sample_rate.
Exceptions
std::invalid_argumentif either sample rate is not positive.

