Loading media/libeffects/cyanogen-dsp/EffectEqualizer.cpp +7 −8 Original line number Diff line number Diff line Loading @@ -79,8 +79,6 @@ int32_t EffectEqualizer::command(uint32_t cmdCode, uint32_t cmdSize, void* pCmdD return 0; } /* Weigher for estimating bass compensation. */ mWeigher.setBandPass(2200.0, mSamplingRate, 0.33); /* 100 updates per second. */ mNextUpdateInterval = int32_t(mSamplingRate / 100.); Loading Loading @@ -196,9 +194,9 @@ int32_t EffectEqualizer::command(uint32_t cmdCode, uint32_t cmdSize, void* pCmdD * sound pressure level. * * The boost can be calculated as linear scaling of the following adjustment: * 20 Hz +40 dB (unmodeled) * 62.5 Hz +20 dB * 250 Hz +8 dB * 20 Hz +45 dB (unmodeled) * 62.5 Hz +24 dB * 250 Hz +10 dB * 1000 Hz 0 dB * 4000 Hz -3 dB * 16000 Hz +6 dB Loading @@ -209,7 +207,7 @@ int32_t EffectEqualizer::command(uint32_t cmdCode, uint32_t cmdSize, void* pCmdD * digital sound level against the audio. */ float EffectEqualizer::getAdjustedBand(int32_t band) { const float adj[5] = { 20.0, 8.0, 0.0, -3.0, 6.0 }; const float adj[5] = { 24.0, 10.0, 0.0, -3.0, 6.0 }; float f = mBand[band]; Loading Loading @@ -275,8 +273,9 @@ int32_t EffectEqualizer::process(audio_buffer_t *in, audio_buffer_t *out) int32_t tmpL = read(in, i * 2); int32_t tmpR = read(in, i * 2 + 1); /* Calculate signal loudness estimate */ int64_t weight = mWeigher.process(tmpL + tmpR); /* Calculate signal loudness estimate. * XXX: should we be independent per channel? */ int64_t weight = tmpL + tmpR; mPowerSquared += weight * weight; /* first "shelve" is just gain */ Loading media/libeffects/cyanogen-dsp/EffectEqualizer.h +0 −1 Original line number Diff line number Diff line Loading @@ -18,7 +18,6 @@ class EffectEqualizer : public Effect { /* Automatic equalizer */ float mLoudnessAdjustment; Biquad mWeigher; float mLoudness; int32_t mNextUpdate; int32_t mNextUpdateInterval; Loading Loading
media/libeffects/cyanogen-dsp/EffectEqualizer.cpp +7 −8 Original line number Diff line number Diff line Loading @@ -79,8 +79,6 @@ int32_t EffectEqualizer::command(uint32_t cmdCode, uint32_t cmdSize, void* pCmdD return 0; } /* Weigher for estimating bass compensation. */ mWeigher.setBandPass(2200.0, mSamplingRate, 0.33); /* 100 updates per second. */ mNextUpdateInterval = int32_t(mSamplingRate / 100.); Loading Loading @@ -196,9 +194,9 @@ int32_t EffectEqualizer::command(uint32_t cmdCode, uint32_t cmdSize, void* pCmdD * sound pressure level. * * The boost can be calculated as linear scaling of the following adjustment: * 20 Hz +40 dB (unmodeled) * 62.5 Hz +20 dB * 250 Hz +8 dB * 20 Hz +45 dB (unmodeled) * 62.5 Hz +24 dB * 250 Hz +10 dB * 1000 Hz 0 dB * 4000 Hz -3 dB * 16000 Hz +6 dB Loading @@ -209,7 +207,7 @@ int32_t EffectEqualizer::command(uint32_t cmdCode, uint32_t cmdSize, void* pCmdD * digital sound level against the audio. */ float EffectEqualizer::getAdjustedBand(int32_t band) { const float adj[5] = { 20.0, 8.0, 0.0, -3.0, 6.0 }; const float adj[5] = { 24.0, 10.0, 0.0, -3.0, 6.0 }; float f = mBand[band]; Loading Loading @@ -275,8 +273,9 @@ int32_t EffectEqualizer::process(audio_buffer_t *in, audio_buffer_t *out) int32_t tmpL = read(in, i * 2); int32_t tmpR = read(in, i * 2 + 1); /* Calculate signal loudness estimate */ int64_t weight = mWeigher.process(tmpL + tmpR); /* Calculate signal loudness estimate. * XXX: should we be independent per channel? */ int64_t weight = tmpL + tmpR; mPowerSquared += weight * weight; /* first "shelve" is just gain */ Loading
media/libeffects/cyanogen-dsp/EffectEqualizer.h +0 −1 Original line number Diff line number Diff line Loading @@ -18,7 +18,6 @@ class EffectEqualizer : public Effect { /* Automatic equalizer */ float mLoudnessAdjustment; Biquad mWeigher; float mLoudness; int32_t mNextUpdate; int32_t mNextUpdateInterval; Loading