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

Unified Diff: webrtc/modules/audio_processing/ns/noise_suppression.c

Issue 1654443004: Surface the noise estimate of the NS to be used by other components (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Make pointers const Created 4 years, 10 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/ns/noise_suppression.c
diff --git a/webrtc/modules/audio_processing/ns/noise_suppression.c b/webrtc/modules/audio_processing/ns/noise_suppression.c
index dd05e0ab3d7f905ca8f936d605e3bd90e0f78f46..54834b95ce3f5c2878972f485fae256a575706b4 100644
--- a/webrtc/modules/audio_processing/ns/noise_suppression.c
+++ b/webrtc/modules/audio_processing/ns/noise_suppression.c
@@ -57,3 +57,15 @@ float WebRtcNs_prior_speech_probability(NsHandle* handle) {
}
return self->priorSpeechProb;
}
+
+const float* WebRtcNs_noise_estimate(NsHandle* handle) {
hlundin-webrtc 2016/02/08 10:12:32 You can make the input a const pointer.
aluebs-webrtc 2016/02/09 00:01:42 Done.
+ NoiseSuppressionC* self = (NoiseSuppressionC*)handle;
hlundin-webrtc 2016/02/08 10:12:32 const
aluebs-webrtc 2016/02/09 00:01:42 Done.
+ if (handle == NULL || self->initFlag == 0) {
+ return NULL;
+ }
+ return self->noise;
+}
+
+size_t WebRtcNs_num_freq() {
+ return HALF_ANAL_BLOCKL;
hlundin-webrtc 2016/02/08 10:12:32 Is this a medical condition? :)
aluebs-webrtc 2016/02/09 00:01:42 I didn't come up with that naming :)
hlundin-webrtc 2016/02/09 15:33:51 Acknowledged.
+}

Powered by Google App Engine
This is Rietveld 408576698