Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(37)

Unified Diff: webrtc/modules/audio_processing/intelligibility/intelligibility_enhancer.cc

Issue 2112553003: Compensate for the LevelController gain in the IntelligibilityEnhancer (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebasing Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/audio_processing/intelligibility/intelligibility_enhancer.cc
diff --git a/webrtc/modules/audio_processing/intelligibility/intelligibility_enhancer.cc b/webrtc/modules/audio_processing/intelligibility/intelligibility_enhancer.cc
index 243bd1222996fdfcfd6f5f38546ee7992c319ca4..63bb1b9b767dfd7259ec72538d2ae847daa02175 100644
--- a/webrtc/modules/audio_processing/intelligibility/intelligibility_enhancer.cc
+++ b/webrtc/modules/audio_processing/intelligibility/intelligibility_enhancer.cc
@@ -111,9 +111,8 @@ IntelligibilityEnhancer::IntelligibilityEnhancer(int sample_rate_hz,
}
void IntelligibilityEnhancer::SetCaptureNoiseEstimate(
- std::vector<float> noise, int gain_db) {
+ std::vector<float> noise, float gain) {
RTC_DCHECK_EQ(noise.size(), num_noise_bins_);
- const float gain = std::pow(10.f, gain_db / 20.f);
for (auto& bin : noise) {
bin *= gain;
}

Powered by Google App Engine
This is Rietveld 408576698