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

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, 1 month 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
« no previous file with comments | « webrtc/modules/audio_processing/BUILD.gn ('k') | webrtc/modules/audio_processing/audio_processing_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 5ab32ec8d10fa416b7da9f2a66398ebc955fb384..d171715a96412642e98df7dc68bef60d4105f621 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"
@@ -126,11 +127,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(rtc::FunctionView<void(AudioProcessing::Config*)> mutator);
+ AudioProcessing::Config GetConfig() const;
+
protected:
// Overridden in a mock.
virtual int InitializeLocked()
@@ -145,11 +151,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,
bool echo_canceller_enabled,
bool mobile_echo_controller_enabled,
bool residual_echo_detector_enabled,
@@ -167,7 +176,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 residual_echo_detector_enabled_ = false;
@@ -240,6 +249,7 @@ class AudioProcessingImpl : public AudioProcessing {
void InitializeLevelController() EXCLUSIVE_LOCKS_REQUIRED(crit_capture_);
void InitializeResidualEchoDetector()
EXCLUSIVE_LOCKS_REQUIRED(crit_render_, crit_capture_);
+ void InitializeLowCutFilter() EXCLUSIVE_LOCKS_REQUIRED(crit_capture_);
void EmptyQueuedRenderAudio();
void AllocateRenderQueue()
« no previous file with comments | « webrtc/modules/audio_processing/BUILD.gn ('k') | webrtc/modules/audio_processing/audio_processing_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698