| 79 | } |
| 80 | |
| 81 | AudioEffectState IndirectEffect::apply(const IndirectEffectParams& params, |
| 82 | const AudioBuffer& in, |
| 83 | AudioBuffer& out) |
| 84 | { |
| 85 | if (mType == IndirectEffectType::Convolution && !params.fftIR) |
| 86 | { |
| 87 | out.makeSilent(); |
| 88 | return AudioEffectState::TailComplete; |
| 89 | } |
| 90 | |
| 91 | if (mType == IndirectEffectType::Convolution) |
| 92 | { |
| 93 | OverlapSaveConvolutionEffectParams overlapSaveParams{}; |
| 94 | overlapSaveParams.fftIR = params.fftIR; |
| 95 | overlapSaveParams.numChannels = params.numChannels; |
| 96 | overlapSaveParams.numSamples = params.numSamples; |
| 97 | |
| 98 | return mConvolutionEffect->apply(overlapSaveParams, in, out); |
| 99 | } |
| 100 | else if (mType == IndirectEffectType::Parametric) |
| 101 | { |
| 102 | ReverbEffectParams reverbParams{}; |
| 103 | reverbParams.reverb = params.reverb; |
| 104 | |
| 105 | return mParametricEffect->apply(reverbParams, in, out); |
| 106 | } |
| 107 | else if (mType == IndirectEffectType::Hybrid) |
| 108 | { |
| 109 | HybridReverbEffectParams hybridParams{}; |
| 110 | hybridParams.fftIR = params.fftIR; |
| 111 | hybridParams.reverb = params.reverb; |
| 112 | hybridParams.eqCoeffs = params.eqCoeffs; |
| 113 | hybridParams.delay = params.delay; |
| 114 | hybridParams.numChannels = params.numChannels; |
| 115 | hybridParams.numSamples = params.numSamples; |
| 116 | |
| 117 | return mHybridEffect->apply(hybridParams, in, out); |
| 118 | } |
| 119 | |
| 120 | return AudioEffectState::TailComplete; |
| 121 | } |
| 122 | |
| 123 | AudioEffectState IndirectEffect::apply(const IndirectEffectParams& params, |
| 124 | const AudioBuffer& in, |
nothing calls this directly
no test coverage detected