| 229 | // Process one sample through a Schroeder allpass. Feedback fixed at 0.5. |
| 230 | template <typename ApT> |
| 231 | inline float processAllpassImpl(ApT& a, float in, int activeLen) |
| 232 | { |
| 233 | const float bufOut = a.buffer[a.index]; |
| 234 | const float out = -in + bufOut; |
| 235 | a.buffer[a.index] = in + bufOut * 0.5f; |
| 236 | a.index = (a.index + 1) % activeLen; |
| 237 | return out; |
| 238 | } |
| 239 | |
| 240 | } // namespace |
| 241 |