| 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 |
| 11 #include "webrtc/modules/interface/module_common_types.h" | 11 #include "webrtc/modules/include/module_common_types.h" |
| 12 #include "webrtc/modules/utility/interface/audio_frame_operations.h" | 12 #include "webrtc/modules/utility/include/audio_frame_operations.h" |
| 13 | 13 |
| 14 namespace webrtc { | 14 namespace webrtc { |
| 15 | 15 |
| 16 void AudioFrameOperations::MonoToStereo(const int16_t* src_audio, | 16 void AudioFrameOperations::MonoToStereo(const int16_t* src_audio, |
| 17 size_t samples_per_channel, | 17 size_t samples_per_channel, |
| 18 int16_t* dst_audio) { | 18 int16_t* dst_audio) { |
| 19 for (size_t i = 0; i < samples_per_channel; i++) { | 19 for (size_t i = 0; i < samples_per_channel; i++) { |
| 20 dst_audio[2 * i] = src_audio[i]; | 20 dst_audio[2 * i] = src_audio[i]; |
| 21 dst_audio[2 * i + 1] = src_audio[i]; | 21 dst_audio[2 * i + 1] = src_audio[i]; |
| 22 } | 22 } |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 } else if (temp_data > 32767) { | 100 } else if (temp_data > 32767) { |
| 101 frame.data_[i] = 32767; | 101 frame.data_[i] = 32767; |
| 102 } else { | 102 } else { |
| 103 frame.data_[i] = static_cast<int16_t>(temp_data); | 103 frame.data_[i] = static_cast<int16_t>(temp_data); |
| 104 } | 104 } |
| 105 } | 105 } |
| 106 return 0; | 106 return 0; |
| 107 } | 107 } |
| 108 | 108 |
| 109 } // namespace webrtc | 109 } // namespace webrtc |
| OLD | NEW |