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 970 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
981 return -1; | 981 return -1; |
982 } | 982 } |
983 } | 983 } |
984 | 984 |
985 assert(_audioFrame.samples_per_channel_ == fileSamples); | 985 assert(_audioFrame.samples_per_channel_ == fileSamples); |
986 | 986 |
987 if (_mixFileWithMicrophone) | 987 if (_mixFileWithMicrophone) |
988 { | 988 { |
989 // Currently file stream is always mono. | 989 // Currently file stream is always mono. |
990 // TODO(xians): Change the code when FilePlayer supports real stereo. | 990 // TODO(xians): Change the code when FilePlayer supports real stereo. |
991 MixWithSat(_audioFrame.data_, | 991 MixWithSat(_audioFrame.mutable_data(), |
992 _audioFrame.num_channels_, | 992 _audioFrame.num_channels_, |
993 fileBuffer.get(), | 993 fileBuffer.get(), |
994 1, | 994 1, |
995 fileSamples); | 995 fileSamples); |
996 } else | 996 } else |
997 { | 997 { |
998 // Replace ACM audio with file. | 998 // Replace ACM audio with file. |
999 // Currently file stream is always mono. | 999 // Currently file stream is always mono. |
1000 // TODO(xians): Change the code when FilePlayer supports real stereo. | 1000 // TODO(xians): Change the code when FilePlayer supports real stereo. |
1001 _audioFrame.UpdateFrame(-1, | 1001 _audioFrame.UpdateFrame(-1, |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1068 void TransmitMixer::EnableStereoChannelSwapping(bool enable) { | 1068 void TransmitMixer::EnableStereoChannelSwapping(bool enable) { |
1069 swap_stereo_channels_ = enable; | 1069 swap_stereo_channels_ = enable; |
1070 } | 1070 } |
1071 | 1071 |
1072 bool TransmitMixer::IsStereoChannelSwappingEnabled() { | 1072 bool TransmitMixer::IsStereoChannelSwappingEnabled() { |
1073 return swap_stereo_channels_; | 1073 return swap_stereo_channels_; |
1074 } | 1074 } |
1075 | 1075 |
1076 } // namespace voe | 1076 } // namespace voe |
1077 } // namespace webrtc | 1077 } // namespace webrtc |
OLD | NEW |