Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(32)

Side by Side Diff: webrtc/modules/audio_coding/main/acm2/audio_coding_module_impl.cc

Issue 1172163004: Reformat existing code. There should be no functional effects. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Resync Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 321 matching lines...) Expand 10 before | Expand all | Expand 10 after
332 } 332 }
333 333
334 if (audio_frame.sample_rate_hz_ > 48000) { 334 if (audio_frame.sample_rate_hz_ > 48000) {
335 assert(false); 335 assert(false);
336 WEBRTC_TRACE(webrtc::kTraceError, webrtc::kTraceAudioCoding, id_, 336 WEBRTC_TRACE(webrtc::kTraceError, webrtc::kTraceAudioCoding, id_,
337 "Cannot Add 10 ms audio, input frequency not valid"); 337 "Cannot Add 10 ms audio, input frequency not valid");
338 return -1; 338 return -1;
339 } 339 }
340 340
341 // If the length and frequency matches. We currently just support raw PCM. 341 // If the length and frequency matches. We currently just support raw PCM.
342 if ((audio_frame.sample_rate_hz_ / 100) 342 if ((audio_frame.sample_rate_hz_ / 100) !=
343 != audio_frame.samples_per_channel_) { 343 audio_frame.samples_per_channel_) {
344 WEBRTC_TRACE(webrtc::kTraceError, webrtc::kTraceAudioCoding, id_, 344 WEBRTC_TRACE(webrtc::kTraceError, webrtc::kTraceAudioCoding, id_,
345 "Cannot Add 10 ms audio, input frequency and length doesn't" 345 "Cannot Add 10 ms audio, input frequency and length doesn't"
346 " match"); 346 " match");
347 return -1; 347 return -1;
348 } 348 }
349 349
350 if (audio_frame.num_channels_ != 1 && audio_frame.num_channels_ != 2) { 350 if (audio_frame.num_channels_ != 1 && audio_frame.num_channels_ != 2) {
351 WEBRTC_TRACE(webrtc::kTraceError, webrtc::kTraceAudioCoding, id_, 351 WEBRTC_TRACE(webrtc::kTraceError, webrtc::kTraceAudioCoding, id_,
352 "Cannot Add 10 ms audio, invalid number of channels."); 352 "Cannot Add 10 ms audio, invalid number of channels.");
353 return -1; 353 return -1;
(...skipping 904 matching lines...) Expand 10 before | Expand all | Expand 10 after
1258 *channels = 1; 1258 *channels = 1;
1259 break; 1259 break;
1260 #endif 1260 #endif
1261 default: 1261 default:
1262 FATAL() << "Codec type " << codec_type << " not supported."; 1262 FATAL() << "Codec type " << codec_type << " not supported.";
1263 } 1263 }
1264 return true; 1264 return true;
1265 } 1265 }
1266 1266
1267 } // namespace webrtc 1267 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698