| 156 | |
| 157 | template<int channels=8, int stepCount=4> |
| 158 | struct DiffuserEqualLengths { |
| 159 | using Array = std::array<double, channels>; |
| 160 | |
| 161 | using Step = DiffusionStep<channels>; |
| 162 | std::array<Step, stepCount> steps; |
| 163 | |
| 164 | DiffuserEqualLengths(double totalDiffusionMs) { |
| 165 | for (auto &step : steps) { |
| 166 | step.delayMsRange = totalDiffusionMs/stepCount; |
| 167 | } |
| 168 | } |
| 169 | |
| 170 | void configure(double sampleRate) { |
| 171 | for (auto &step : steps) step.configure(sampleRate); |
| 172 | } |
| 173 | |
| 174 | Array process(Array samples) { |
| 175 | for (auto &step : steps) { |
| 176 | samples = step.process(samples); |
| 177 | } |
| 178 | return samples; |
| 179 | } |
| 180 | }; |
| 181 | |
| 182 | template<int channels=8, int stepCount=4> |
| 183 | struct DiffuserHalfLengths { |
nothing calls this directly
no outgoing calls
no test coverage detected