| 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/channel_mixer.h" | 5 #include "media/base/channel_mixer.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "media/audio/audio_parameters.h" | |
| 11 #include "media/base/audio_bus.h" | 10 #include "media/base/audio_bus.h" |
| 11 #include "media/base/audio_parameters.h" |
| 12 #include "media/base/channel_mixing_matrix.h" | 12 #include "media/base/channel_mixing_matrix.h" |
| 13 #include "media/base/vector_math.h" | 13 #include "media/base/vector_math.h" |
| 14 | 14 |
| 15 namespace media { | 15 namespace media { |
| 16 | 16 |
| 17 ChannelMixer::ChannelMixer(ChannelLayout input_layout, | 17 ChannelMixer::ChannelMixer(ChannelLayout input_layout, |
| 18 ChannelLayout output_layout) { | 18 ChannelLayout output_layout) { |
| 19 Initialize(input_layout, | 19 Initialize(input_layout, |
| 20 ChannelLayoutToChannelCount(input_layout), | 20 ChannelLayoutToChannelCount(input_layout), |
| 21 output_layout, | 21 output_layout, |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 DCHECK_GE(scale, 0); | 72 DCHECK_GE(scale, 0); |
| 73 if (scale > 0) { | 73 if (scale > 0) { |
| 74 vector_math::FMAC(input->channel(input_ch), scale, output->frames(), | 74 vector_math::FMAC(input->channel(input_ch), scale, output->frames(), |
| 75 output->channel(output_ch)); | 75 output->channel(output_ch)); |
| 76 } | 76 } |
| 77 } | 77 } |
| 78 } | 78 } |
| 79 } | 79 } |
| 80 | 80 |
| 81 } // namespace media | 81 } // namespace media |
| OLD | NEW |