MCPcopy Create free account
hub / github.com/ZL-Audio/ZLEqualizer / prepare

Method prepare

source/dsp/delay/integer_delay.hpp:32–43  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

30 }
31
32 void prepare(const double sample_rate,
33 const size_t max_num_samples,
34 const size_t num_channels,
35 const FloatType maximum_delay_seconds) {
36 sample_rate_ = sample_rate;
37 delay_seconds_ = std::min(delay_seconds_, maximum_delay_seconds);
38 const auto maximum_delay_samples = static_cast<double>(maximum_delay_seconds) * sample_rate;
39 capacity_ = static_cast<int>(std::ceil(maximum_delay_samples)) + static_cast<int>(max_num_samples) + 1;
40 states_.resize(num_channels);
41
42 reset();
43 }
44
45 void process(std::span<FloatType*> input, size_t num_samples) {
46 // write input samples to states

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected