OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 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 | 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 | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
11 #include "webrtc/modules/audio_processing/splitting_filter.h" | 11 #include "webrtc/modules/audio_processing/splitting_filter.h" |
12 | 12 |
13 #include "webrtc/base/checks.h" | 13 #include "webrtc/common_audio/channel_buffer.h" |
14 #include "webrtc/common_audio/signal_processing/include/signal_processing_librar
y.h" | 14 #include "webrtc/common_audio/signal_processing/include/signal_processing_librar
y.h" |
15 #include "webrtc/common_audio/channel_buffer.h" | 15 #include "webrtc/rtc_base/checks.h" |
16 | 16 |
17 namespace webrtc { | 17 namespace webrtc { |
18 | 18 |
19 SplittingFilter::SplittingFilter(size_t num_channels, | 19 SplittingFilter::SplittingFilter(size_t num_channels, |
20 size_t num_bands, | 20 size_t num_bands, |
21 size_t num_frames) | 21 size_t num_frames) |
22 : num_bands_(num_bands) { | 22 : num_bands_(num_bands) { |
23 RTC_CHECK(num_bands_ == 2 || num_bands_ == 3); | 23 RTC_CHECK(num_bands_ == 2 || num_bands_ == 3); |
24 if (num_bands_ == 2) { | 24 if (num_bands_ == 2) { |
25 two_bands_states_.resize(num_channels); | 25 two_bands_states_.resize(num_channels); |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 IFChannelBuffer* data) { | 99 IFChannelBuffer* data) { |
100 RTC_DCHECK_LE(data->num_channels(), three_band_filter_banks_.size()); | 100 RTC_DCHECK_LE(data->num_channels(), three_band_filter_banks_.size()); |
101 for (size_t i = 0; i < data->num_channels(); ++i) { | 101 for (size_t i = 0; i < data->num_channels(); ++i) { |
102 three_band_filter_banks_[i]->Synthesis(bands->fbuf_const()->bands(i), | 102 three_band_filter_banks_[i]->Synthesis(bands->fbuf_const()->bands(i), |
103 bands->num_frames_per_band(), | 103 bands->num_frames_per_band(), |
104 data->fbuf()->channels()[i]); | 104 data->fbuf()->channels()[i]); |
105 } | 105 } |
106 } | 106 } |
107 | 107 |
108 } // namespace webrtc | 108 } // namespace webrtc |
OLD | NEW |