Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 /* | |
| 2 * Copyright (c) 2016 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_LEVEL_CONTROLLER_DOWN_SAMPLER_H_ | |
| 12 #define WEBRTC_MODULES_AUDIO_PROCESSING_LEVEL_CONTROLLER_DOWN_SAMPLER_H_ | |
| 13 | |
| 14 #include <memory> | |
| 15 | |
| 16 #include "webrtc/base/array_view.h" | |
| 17 #include "webrtc/base/constructormagic.h" | |
| 18 | |
| 19 namespace webrtc { | |
| 20 | |
| 21 class ApmDataDumper; | |
| 22 class BiQuadFilter; | |
| 23 | |
| 24 class DownSampler { | |
| 25 public: | |
| 26 DownSampler(ApmDataDumper* data_dumper, int sample_rate_hz); | |
|
hlundin-webrtc
2016/06/27 11:21:14
data_dumper is in some sense an output variable, s
peah-webrtc
2016/06/27 22:51:47
Done.
| |
| 27 ~DownSampler(); | |
|
hlundin-webrtc
2016/06/27 11:21:14
Do you need this? And if so, consider using = defu
peah-webrtc
2016/06/27 22:51:47
I think it is needed as the ApmDataDumper and BiQu
hlundin-webrtc
2016/06/28 11:29:00
Acknowledged.
peah-webrtc
2016/06/28 22:19:37
Acknowledged.
| |
| 28 | |
| 29 void DownSample(rtc::ArrayView<const float> in, rtc::ArrayView<float> out); | |
| 30 | |
| 31 private: | |
| 32 ApmDataDumper* data_dumper_; | |
| 33 const int sample_rate_hz_; | |
| 34 std::unique_ptr<BiQuadFilter> low_pass_filter_; | |
| 35 int down_sampling_factor_; | |
| 36 | |
| 37 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(DownSampler); | |
| 38 }; | |
| 39 | |
| 40 } // namespace webrtc | |
| 41 | |
| 42 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_LEVEL_CONTROLLER_DOWN_SAMPLER_H_ | |
| OLD | NEW |