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

Unified Diff: webrtc/modules/audio_processing/ns/noise_suppression_x.h

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_x.h
diff --git a/webrtc/modules/audio_processing/ns/noise_suppression_x.h b/webrtc/modules/audio_processing/ns/noise_suppression_x.h
index 02b44cc09108ee876bc6799d945b6a9c1579ba0f..4542f44d6f8c09f4938207ecb879719dccc940a6 100644
--- a/webrtc/modules/audio_processing/ns/noise_suppression_x.h
+++ b/webrtc/modules/audio_processing/ns/noise_suppression_x.h
@@ -11,6 +11,8 @@
#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_NS_NOISE_SUPPRESSION_X_H_
#define WEBRTC_MODULES_AUDIO_PROCESSING_NS_NOISE_SUPPRESSION_X_H_
+#include <stddef.h>
+
#include "webrtc/typedefs.h"
typedef struct NsxHandleT NsxHandle;
@@ -81,6 +83,24 @@ void WebRtcNsx_Process(NsxHandle* nsxInst,
int num_bands,
short* const* outFrame);
+/* Returns a pointer to the noise estimate per frequency bin. The number of
+ * frequency bins can be get using WebRtcNsx_num_freq().
hlundin-webrtc 2016/02/08 10:12:32 "can be get" -> "can be provided" or something els
aluebs-webrtc 2016/02/09 00:01:43 Done.
+ *
+ * Input
+ * - nsxInst : NSx instance. Needs to be initiated before call.
+ *
+ * Return value : Pointer to the noise estimate per frequency bin.
+ * NULL pointer - NULL pointer or uninitialized instance.
hlundin-webrtc 2016/02/08 10:12:32 Same as before.
aluebs-webrtc 2016/02/09 00:01:43 Done.
+ */
+const uint32_t* WebRtcNsx_noise_estimate(NsxHandle* nsxInst);
+
+/* Returns the number of frequency bins, which is the length of the noise
+ * estimate for example.
+ *
+ * Return value : Number of frequency bins.
+ */
+size_t WebRtcNsx_num_freq();
+
#ifdef __cplusplus
}
#endif

Powered by Google App Engine
This is Rietveld 408576698