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

Side by Side Diff: webrtc/modules/audio_coding/acm2/acm_receive_test_oldapi.cc

Issue 1316523002: Convert channel counts to size_t. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Fix compile Created 4 years, 11 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) 2014 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2014 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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 // iSAC wideband = 103 48 // iSAC wideband = 103
49 // iSAC super-wideband = 104 49 // iSAC super-wideband = 104
50 // AVT/DTMF = 106 50 // AVT/DTMF = 106
51 // RED = 117 51 // RED = 117
52 // PCM16b 8 kHz = 93 52 // PCM16b 8 kHz = 93
53 // PCM16b 16 kHz = 94 53 // PCM16b 16 kHz = 94
54 // PCM16b 32 kHz = 95 54 // PCM16b 32 kHz = 95
55 // G.722 = 94 55 // G.722 = 94
56 bool RemapPltypeAndUseThisCodec(const char* plname, 56 bool RemapPltypeAndUseThisCodec(const char* plname,
57 int plfreq, 57 int plfreq,
58 int channels, 58 size_t channels,
59 int* pltype) { 59 int* pltype) {
60 if (channels != 1) 60 if (channels != 1)
61 return false; // Don't use non-mono codecs. 61 return false; // Don't use non-mono codecs.
62 62
63 // Re-map pltypes to those used in the NetEq test files. 63 // Re-map pltypes to those used in the NetEq test files.
64 if (STR_CASE_CMP(plname, "PCMU") == 0 && plfreq == 8000) { 64 if (STR_CASE_CMP(plname, "PCMU") == 0 && plfreq == 8000) {
65 *pltype = 0; 65 *pltype = 0;
66 } else if (STR_CASE_CMP(plname, "PCMA") == 0 && plfreq == 8000) { 66 } else if (STR_CASE_CMP(plname, "PCMA") == 0 && plfreq == 8000) {
67 *pltype = 8; 67 *pltype = 8;
68 } else if (STR_CASE_CMP(plname, "CN") == 0 && plfreq == 8000) { 68 } else if (STR_CASE_CMP(plname, "CN") == 0 && plfreq == 8000) {
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 if (clock_.TimeInMilliseconds() >= last_toggle_time_ms_ + toggle_period_ms_) { 213 if (clock_.TimeInMilliseconds() >= last_toggle_time_ms_ + toggle_period_ms_) {
214 output_freq_hz_ = (output_freq_hz_ == output_freq_hz_1_) 214 output_freq_hz_ = (output_freq_hz_ == output_freq_hz_1_)
215 ? output_freq_hz_2_ 215 ? output_freq_hz_2_
216 : output_freq_hz_1_; 216 : output_freq_hz_1_;
217 last_toggle_time_ms_ = clock_.TimeInMilliseconds(); 217 last_toggle_time_ms_ = clock_.TimeInMilliseconds();
218 } 218 }
219 } 219 }
220 220
221 } // namespace test 221 } // namespace test
222 } // namespace webrtc 222 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/audio_coding/acm2/acm_codec_database.cc ('k') | webrtc/modules/audio_coding/acm2/acm_receiver.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698