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

Unified Diff: webrtc/modules/audio_processing/audio_processing_impl.h

Issue 2415403002: Introduced the new parameter setting scheme for activating the high-pass filter in APM (Closed)
Patch Set: Changes in response to reviewer comments Created 4 years, 2 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/audio_processing_impl.h
diff --git a/webrtc/modules/audio_processing/audio_processing_impl.h b/webrtc/modules/audio_processing/audio_processing_impl.h
index aec4ed7086d992b3bcb01d154a5d49f1dc392406..b941398a45d61ae4818e47d24b7e8adab2eb28da 100644
--- a/webrtc/modules/audio_processing/audio_processing_impl.h
+++ b/webrtc/modules/audio_processing/audio_processing_impl.h
@@ -17,6 +17,7 @@
#include <vector>
#include "webrtc/base/criticalsection.h"
+#include "webrtc/base/function_view.h"
#include "webrtc/base/gtest_prod_util.h"
#include "webrtc/base/ignore_wundef.h"
#include "webrtc/base/swap_queue.h"
@@ -124,11 +125,16 @@ class AudioProcessingImpl : public AudioProcessing {
EchoCancellation* echo_cancellation() const override;
EchoControlMobile* echo_control_mobile() const override;
GainControl* gain_control() const override;
+ // TODO(peah): Deprecate this API call.
HighPassFilter* high_pass_filter() const override;
LevelEstimator* level_estimator() const override;
NoiseSuppression* noise_suppression() const override;
VoiceDetection* voice_detection() const override;
+ // TODO(peah): Remove these two methods once the new API allows that.
+ void MutateConfig(std::function<void(AudioProcessing::Config*)> mutator);
+ AudioProcessing::Config GetConfig() const;
+
protected:
// Overridden in a mock.
virtual int InitializeLocked()
@@ -143,11 +149,14 @@ class AudioProcessingImpl : public AudioProcessing {
struct ApmPublicSubmodules;
struct ApmPrivateSubmodules;
+ // Submodule interface implementations.
+ std::unique_ptr<HighPassFilter> high_pass_filter_impl_;
+
class ApmSubmoduleStates {
public:
ApmSubmoduleStates();
// Updates the submodule state and returns true if it has changed.
- bool Update(bool high_pass_filter_enabled,
+ bool Update(bool low_cut_filter_enabled,
the sun 2016/10/28 12:38:32 I'm not so sure about this use of low cut vs high
peah-webrtc 2016/10/28 12:47:46 I agree that it is confusing. But I think using th
bool echo_canceller_enabled,
bool mobile_echo_controller_enabled,
bool noise_suppressor_enabled,
@@ -164,7 +173,7 @@ class AudioProcessingImpl : public AudioProcessing {
bool RenderMultiBandProcessingActive() const;
private:
- bool high_pass_filter_enabled_ = false;
+ bool low_cut_filter_enabled_ = false;
bool echo_canceller_enabled_ = false;
bool mobile_echo_controller_enabled_ = false;
bool noise_suppressor_enabled_ = false;
@@ -234,6 +243,7 @@ class AudioProcessingImpl : public AudioProcessing {
int InitializeLocked(const ProcessingConfig& config)
EXCLUSIVE_LOCKS_REQUIRED(crit_render_, crit_capture_);
void InitializeLevelController() EXCLUSIVE_LOCKS_REQUIRED(crit_capture_);
+ void InitializeLowCutFilter() EXCLUSIVE_LOCKS_REQUIRED(crit_capture_);
void EmptyQueuedRenderAudio();
void AllocateRenderQueue()

Powered by Google App Engine
This is Rietveld 408576698