OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "media/base/multi_channel_resampler.h" | 5 #include "media/base/multi_channel_resampler.h" |
6 | 6 |
| 7 #include <algorithm> |
| 8 |
7 #include "base/bind.h" | 9 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
9 #include "base/logging.h" | 11 #include "base/logging.h" |
10 #include "media/base/audio_bus.h" | 12 #include "media/base/audio_bus.h" |
11 | 13 |
12 namespace media { | 14 namespace media { |
13 | 15 |
14 MultiChannelResampler::MultiChannelResampler(int channels, | 16 MultiChannelResampler::MultiChannelResampler(int channels, |
15 double io_sample_rate_ratio, | 17 double io_sample_rate_ratio, |
16 size_t request_size, | 18 size_t request_size, |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 return resamplers_[0]->BufferedFrames(); | 121 return resamplers_[0]->BufferedFrames(); |
120 } | 122 } |
121 | 123 |
122 void MultiChannelResampler::PrimeWithSilence() { | 124 void MultiChannelResampler::PrimeWithSilence() { |
123 DCHECK(!resamplers_.empty()); | 125 DCHECK(!resamplers_.empty()); |
124 for (size_t i = 0; i < resamplers_.size(); ++i) | 126 for (size_t i = 0; i < resamplers_.size(); ++i) |
125 resamplers_[i]->PrimeWithSilence(); | 127 resamplers_[i]->PrimeWithSilence(); |
126 } | 128 } |
127 | 129 |
128 } // namespace media | 130 } // namespace media |
OLD | NEW |