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

Unified Diff: webrtc/modules/audio_processing/noise_suppression_impl.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/noise_suppression_impl.h
diff --git a/webrtc/modules/audio_processing/noise_suppression_impl.h b/webrtc/modules/audio_processing/noise_suppression_impl.h
index debbc61bc95c4b724b2e73c37c95b3e6799c34c3..14b07357452d201583d7fec5c2a0f54e33215809 100644
--- a/webrtc/modules/audio_processing/noise_suppression_impl.h
+++ b/webrtc/modules/audio_processing/noise_suppression_impl.h
@@ -11,6 +11,8 @@
#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_NOISE_SUPPRESSION_IMPL_H_
#define WEBRTC_MODULES_AUDIO_PROCESSING_NOISE_SUPPRESSION_IMPL_H_
+#include <vector>
+
#include "webrtc/base/constructormagic.h"
#include "webrtc/base/criticalsection.h"
#include "webrtc/base/scoped_ptr.h"
@@ -36,6 +38,7 @@ class NoiseSuppressionImpl : public NoiseSuppression {
int set_level(Level level) override;
Level level() const override;
float speech_probability() const override;
+ const std::vector<float>& noise_estimate() override;
private:
class Suppressor;
@@ -45,6 +48,8 @@ class NoiseSuppressionImpl : public NoiseSuppression {
size_t channels_ GUARDED_BY(crit_) = 0;
int sample_rate_hz_ GUARDED_BY(crit_) = 0;
std::vector<rtc::scoped_ptr<Suppressor>> suppressors_ GUARDED_BY(crit_);
+ std::vector<float> noise_estimate_ GUARDED_BY(crit_);
+ bool noise_estimate_updated_ GUARDED_BY(crit_);
RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(NoiseSuppressionImpl);
};
} // namespace webrtc

Powered by Google App Engine
This is Rietveld 408576698