| 181 | |
| 182 | template<int channels=8, int stepCount=4> |
| 183 | struct DiffuserHalfLengths { |
| 184 | using Array = std::array<double, channels>; |
| 185 | |
| 186 | using Step = DiffusionStep<channels>; |
| 187 | std::array<Step, stepCount> steps; |
| 188 | |
| 189 | DiffuserHalfLengths(double diffusionMs) { |
| 190 | for (auto &step : steps) { |
| 191 | diffusionMs *= 0.5; |
| 192 | step.delayMsRange = diffusionMs; |
| 193 | } |
| 194 | } |
| 195 | |
| 196 | void configure(double sampleRate) { |
| 197 | for (auto &step : steps) step.configure(sampleRate); |
| 198 | } |
| 199 | |
| 200 | Array process(Array samples) { |
| 201 | for (auto &step : steps) { |
| 202 | samples = step.process(samples); |
| 203 | } |
| 204 | return samples; |
| 205 | } |
| 206 | }; |
| 207 | |
| 208 | template<int channels=8, int diffusionSteps=4> |
| 209 | struct BasicReverb { |
nothing calls this directly
no outgoing calls
no test coverage detected