| Index: webrtc/modules/audio_processing/high_pass_filter_impl.cc
|
| diff --git a/webrtc/modules/audio_processing/high_pass_filter_impl.cc b/webrtc/modules/audio_processing/high_pass_filter_impl.cc
|
| index 29e482078e9438ba6a0397986ca1c702e865e0ca..8de2162175ca762f502f91ff83188b2cf79a1789 100644
|
| --- a/webrtc/modules/audio_processing/high_pass_filter_impl.cc
|
| +++ b/webrtc/modules/audio_processing/high_pass_filter_impl.cc
|
| @@ -100,14 +100,14 @@ int Filter(FilterState* hpf, int16_t* data, size_t length) {
|
| typedef FilterState Handle;
|
|
|
| HighPassFilterImpl::HighPassFilterImpl(const AudioProcessing* apm,
|
| - CriticalSectionWrapper* crit)
|
| - : ProcessingComponent(),
|
| - apm_(apm),
|
| - crit_(crit) {}
|
| + rtc::CriticalSection* crit)
|
| + : ProcessingComponent(), apm_(apm), crit_(crit) {}
|
|
|
| HighPassFilterImpl::~HighPassFilterImpl() {}
|
|
|
| int HighPassFilterImpl::ProcessCaptureAudio(AudioBuffer* audio) {
|
| + // This function is only called from within APM and does not/cannot
|
| + // take a lock.
|
| int err = apm_->kNoError;
|
|
|
| if (!is_component_enabled()) {
|
| @@ -131,11 +131,12 @@ int HighPassFilterImpl::ProcessCaptureAudio(AudioBuffer* audio) {
|
| }
|
|
|
| int HighPassFilterImpl::Enable(bool enable) {
|
| - CriticalSectionScoped crit_scoped(crit_);
|
| + rtc::CritScope cs(crit_);
|
| return EnableComponent(enable);
|
| }
|
|
|
| bool HighPassFilterImpl::is_enabled() const {
|
| + rtc::CritScope cs(crit_);
|
| return is_component_enabled();
|
| }
|
|
|
| @@ -148,6 +149,8 @@ void HighPassFilterImpl::DestroyHandle(void* handle) const {
|
| }
|
|
|
| int HighPassFilterImpl::InitializeHandle(void* handle) const {
|
| + // TODO(peah): Remove dependency on apm for the
|
| + // capture side sample rate.
|
| return InitializeFilter(static_cast<Handle*>(handle),
|
| apm_->proc_sample_rate_hz());
|
| }
|
|
|