| 18 | const float SmoothingTimeConstant = 0.020f; // 20ms |
| 19 | |
| 20 | DelayDSPKernel::DelayDSPKernel(DelayProcessor * processor, float sampleRate) |
| 21 | : AudioDSPKernel(processor) |
| 22 | , m_writeIndex(0) |
| 23 | , m_firstTime(true) |
| 24 | , m_delayTimes(AudioNode::ProcessingSizeInFrames) |
| 25 | { |
| 26 | ASSERT(processor); |
| 27 | if (!processor) |
| 28 | return; |
| 29 | |
| 30 | m_maxDelayTime = processor->maxDelayTime(); |
| 31 | ASSERT(m_maxDelayTime >= 0); |
| 32 | if (m_maxDelayTime < 0) |
| 33 | return; |
| 34 | |
| 35 | m_buffer.allocate((int) bufferLengthForDelay(m_maxDelayTime, sampleRate)); |
| 36 | m_buffer.zero(); |
| 37 | |
| 38 | m_smoothingRate = AudioUtilities::discreteTimeConstantForSampleRate(SmoothingTimeConstant, sampleRate); |
| 39 | } |
| 40 | |
| 41 | DelayDSPKernel::DelayDSPKernel(double maxDelayTime, float sampleRate) |
| 42 | : AudioDSPKernel() |
nothing calls this directly
no test coverage detected