| 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 // We only support mono-to-stereo. | 43 // We only support mono-to-stereo. |
| 44 assert(mixed_frame->num_channels_ == 2 && | 44 assert(mixed_frame->num_channels_ == 2 && |
| 45 frame->num_channels_ == 1); | 45 frame->num_channels_ == 1); |
| 46 AudioFrameOperations::MonoToStereo(frame); | 46 AudioFrameOperations::MonoToStereo(frame); |
| 47 } | 47 } |
| 48 | 48 |
| 49 *mixed_frame += *frame; | 49 *mixed_frame += *frame; |
| 50 } | 50 } |
| 51 | 51 |
| 52 // Return the max number of channels from a |list| composed of AudioFrames. | 52 // Return the max number of channels from a |list| composed of AudioFrames. |
| 53 int MaxNumChannels(const AudioFrameList* list) { | 53 size_t MaxNumChannels(const AudioFrameList* list) { |
| 54 int max_num_channels = 1; | 54 size_t max_num_channels = 1; |
| 55 for (AudioFrameList::const_iterator iter = list->begin(); | 55 for (AudioFrameList::const_iterator iter = list->begin(); |
| 56 iter != list->end(); | 56 iter != list->end(); |
| 57 ++iter) { | 57 ++iter) { |
| 58 max_num_channels = std::max(max_num_channels, (*iter)->num_channels_); | 58 max_num_channels = std::max(max_num_channels, (*iter)->num_channels_); |
| 59 } | 59 } |
| 60 return max_num_channels; | 60 return max_num_channels; |
| 61 } | 61 } |
| 62 | 62 |
| 63 } // namespace | 63 } // namespace |
| 64 | 64 |
| (...skipping 858 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 923 | 923 |
| 924 if(error != _limiter->kNoError) { | 924 if(error != _limiter->kNoError) { |
| 925 WEBRTC_TRACE(kTraceError, kTraceAudioMixerServer, _id, | 925 WEBRTC_TRACE(kTraceError, kTraceAudioMixerServer, _id, |
| 926 "Error from AudioProcessing: %d", error); | 926 "Error from AudioProcessing: %d", error); |
| 927 assert(false); | 927 assert(false); |
| 928 return false; | 928 return false; |
| 929 } | 929 } |
| 930 return true; | 930 return true; |
| 931 } | 931 } |
| 932 } // namespace webrtc | 932 } // namespace webrtc |
| OLD | NEW |