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

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: Dont return reference to memeber vector 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..8b6f45fce8b215fe480918a2d6a2545c9b89334b 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(const NsHandle* handle) {
+ const NoiseSuppressionC* self = (const NoiseSuppressionC*)handle;
+ if (handle == NULL || self->initFlag == 0) {
+ return NULL;
+ }
+ return self->noise;
+}
+
+size_t WebRtcNs_num_freq() {
+ return HALF_ANAL_BLOCKL;
+}

Powered by Google App Engine
This is Rietveld 408576698