| 97 | } |
| 98 | |
| 99 | void EqualizerDetector::setMicProfile(MicProfile profile) { |
| 100 | mCurrentMicProfile = profile; |
| 101 | MicResponseCurve curve = getMicResponseCurve(profile); |
| 102 | mHasMicCorrection = (curve.count > 0); |
| 103 | if (mHasMicCorrection) { |
| 104 | float binCenters[kNumBins]; |
| 105 | computeBinCenters(binCenters); |
| 106 | downsampleMicResponse(curve, binCenters, kNumBins, mMicGains); |
| 107 | } else { |
| 108 | for (int i = 0; i < kNumBins; ++i) { |
| 109 | mMicGains[i] = 1.0f; |
| 110 | } |
| 111 | } |
| 112 | } |
| 113 | |
| 114 | void EqualizerDetector::computeBinCenters(float* out) const { |
| 115 | // Log-spaced bin centers matching Bins::binToFreq formula |
nothing calls this directly
no test coverage detected