Chromium Code Reviews

Unified Diff: webrtc/modules/audio_processing/noise_suppression_impl.cc

Issue 1766383002: Convert IntelligibilityEnhancer to multi-threaded mode (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Index: webrtc/modules/audio_processing/noise_suppression_impl.cc
diff --git a/webrtc/modules/audio_processing/noise_suppression_impl.cc b/webrtc/modules/audio_processing/noise_suppression_impl.cc
index 7f19005924de76373ebe8547337e341ad0656767..aa979b6e73f82e02286fe30c351e0de1aff20e3d 100644
--- a/webrtc/modules/audio_processing/noise_suppression_impl.cc
+++ b/webrtc/modules/audio_processing/noise_suppression_impl.cc
@@ -200,4 +200,15 @@ std::vector<float> NoiseSuppressionImpl::NoiseEstimate() {
return noise_estimate;
}
+size_t NoiseSuppressionImpl::num_noise_bins() const {
+ rtc::CritScope cs(crit_);
+ size_t num_freq = 0u;
hlundin-webrtc 2016/03/08 10:28:48 Exactly one of WEBRTC_NS_FLOAT and _FIXED must be
kwiberg-webrtc 2016/03/08 10:40:22 This still doesn't fail if both are defined. Also
aluebs-webrtc 2016/03/08 10:53:00 In general I think the functions with only one ret
hlundin-webrtc 2016/03/08 13:35:19 This is good. Don't add any verification. This is
+#if defined(WEBRTC_NS_FLOAT)
+ num_freq = WebRtcNs_num_freq();
+#elif defined(WEBRTC_NS_FIXED)
+ num_freq = WebRtcNsx_num_freq();
+#endif
+ return num_freq;
+}
+
} // namespace webrtc

Powered by Google App Engine