OLD | NEW |
| (Empty) |
1 /* | |
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | |
3 * | |
4 * Use of this source code is governed by a BSD-style license | |
5 * that can be found in the LICENSE file in the root of the source | |
6 * tree. An additional intellectual property rights grant can be found | |
7 * in the file PATENTS. All contributing project authors may | |
8 * be found in the AUTHORS file in the root of the source tree. | |
9 */ | |
10 | |
11 #ifndef WEBRTC_MODULES_AUDIO_PROCESSING_HIGH_PASS_FILTER_IMPL_H_ | |
12 #define WEBRTC_MODULES_AUDIO_PROCESSING_HIGH_PASS_FILTER_IMPL_H_ | |
13 | |
14 #include <memory> | |
15 #include <vector> | |
16 | |
17 #include "webrtc/base/constructormagic.h" | |
18 #include "webrtc/base/criticalsection.h" | |
19 #include "webrtc/modules/audio_processing/include/audio_processing.h" | |
20 | |
21 namespace webrtc { | |
22 | |
23 class AudioBuffer; | |
24 | |
25 class HighPassFilterImpl : public HighPassFilter { | |
26 public: | |
27 explicit HighPassFilterImpl(rtc::CriticalSection* crit); | |
28 ~HighPassFilterImpl() override; | |
29 | |
30 // TODO(peah): Fold into ctor, once public API is removed. | |
31 void Initialize(size_t channels, int sample_rate_hz); | |
32 void ProcessCaptureAudio(AudioBuffer* audio); | |
33 | |
34 // HighPassFilter implementation. | |
35 int Enable(bool enable) override; | |
36 bool is_enabled() const override; | |
37 | |
38 private: | |
39 class BiquadFilter; | |
40 rtc::CriticalSection* const crit_ = nullptr; | |
41 bool enabled_ GUARDED_BY(crit_) = false; | |
42 std::vector<std::unique_ptr<BiquadFilter>> filters_ GUARDED_BY(crit_); | |
43 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(HighPassFilterImpl); | |
44 }; | |
45 } // namespace webrtc | |
46 | |
47 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_HIGH_PASS_FILTER_IMPL_H_ | |
OLD | NEW |