Chromium Code Reviews| 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..eb88484d7e485cefefa605c3b7de0c2b19f53f95 100644 |
| --- a/webrtc/modules/audio_processing/audio_processing_impl.h |
| +++ b/webrtc/modules/audio_processing/audio_processing_impl.h |
| @@ -22,6 +22,7 @@ |
| #include "webrtc/base/swap_queue.h" |
| #include "webrtc/base/thread_annotations.h" |
| #include "webrtc/modules/audio_processing/audio_buffer.h" |
| +#include "webrtc/modules/audio_processing/high_pass_filter_impl.h" |
| #include "webrtc/modules/audio_processing/include/audio_processing.h" |
| #include "webrtc/modules/audio_processing/render_queue_item_verifier.h" |
| #include "webrtc/system_wrappers/include/file_wrapper.h" |
| @@ -124,11 +125,27 @@ 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. |
| + template <typename MutatorFunction> |
| + void MutateConfig(MutatorFunction mutator) { |
|
the sun
2016/10/28 10:52:53
Nice! Can we do without it being a template though
kwiberg-webrtc
2016/10/28 11:07:00
rtc::FunctionView is the right thing to use in a c
peah-webrtc
2016/10/28 12:19:52
Great suggestion!
Done.
peah-webrtc
2016/10/28 12:19:52
Thanks! I think the FunctionView became really nic
kwiberg-webrtc
2016/10/28 12:28:56
No, you used std::function instead (which will als
peah-webrtc
2016/10/28 12:36:12
You are right! I tried both locally and removed th
|
| + rtc::CritScope cs_render(&crit_render_); |
| + rtc::CritScope cs_capture(&crit_capture_); |
| + mutator(&config_); |
| + ApplyConfig(config_); |
| + } |
| + |
| + AudioProcessing::Config GetConfig() const { |
| + rtc::CritScope cs_render(&crit_render_); |
| + rtc::CritScope cs_capture(&crit_capture_); |
| + return config_; |
| + } |
| + |
| protected: |
| // Overridden in a mock. |
| virtual int InitializeLocked() |
| @@ -143,6 +160,9 @@ class AudioProcessingImpl : public AudioProcessing { |
| struct ApmPublicSubmodules; |
| struct ApmPrivateSubmodules; |
| + // Submodule interface implementations. |
| + std::unique_ptr<HighPassFilterImpl> high_pass_filter_impl_; |
|
the sun
2016/10/28 10:52:53
I don't see why you couldn't have a pointer to a H
peah-webrtc
2016/10/28 12:19:52
That is an awesome suggestion!!!
Done.
|
| + |
| class ApmSubmoduleStates { |
| public: |
| ApmSubmoduleStates(); |
| @@ -234,6 +254,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 InitializeHighPassFilter() EXCLUSIVE_LOCKS_REQUIRED(crit_capture_); |
| void EmptyQueuedRenderAudio(); |
| void AllocateRenderQueue() |