OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 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 |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 filters_.resize(channels); | 84 filters_.resize(channels); |
85 for (size_t i = 0; i < channels; i++) { | 85 for (size_t i = 0; i < channels; i++) { |
86 filters_[i].reset(new BiquadFilter(sample_rate_hz)); | 86 filters_[i].reset(new BiquadFilter(sample_rate_hz)); |
87 } | 87 } |
88 } | 88 } |
89 | 89 |
90 LowCutFilter::~LowCutFilter() {} | 90 LowCutFilter::~LowCutFilter() {} |
91 | 91 |
92 void LowCutFilter::Process(AudioBuffer* audio) { | 92 void LowCutFilter::Process(AudioBuffer* audio) { |
93 RTC_DCHECK(audio); | 93 RTC_DCHECK(audio); |
94 RTC_DCHECK_GE(160u, audio->num_frames_per_band()); | 94 RTC_DCHECK_GE(160, audio->num_frames_per_band()); |
95 RTC_DCHECK_EQ(filters_.size(), audio->num_channels()); | 95 RTC_DCHECK_EQ(filters_.size(), audio->num_channels()); |
96 for (size_t i = 0; i < filters_.size(); i++) { | 96 for (size_t i = 0; i < filters_.size(); i++) { |
97 filters_[i]->Process(audio->split_bands(i)[kBand0To8kHz], | 97 filters_[i]->Process(audio->split_bands(i)[kBand0To8kHz], |
98 audio->num_frames_per_band()); | 98 audio->num_frames_per_band()); |
99 } | 99 } |
100 } | 100 } |
101 | 101 |
102 } // namespace webrtc | 102 } // namespace webrtc |
OLD | NEW |