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

Side by Side Diff: webrtc/modules/audio_processing/test/bitexactness_tools.cc

Issue 2623313004: Replace RTC_DCHECK(false) with RTC_NOTREACHED(). (Closed)
Patch Set: Created 3 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) 2016 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2016 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 14 matching lines...) Expand all
25 switch (sample_rate_hz) { 25 switch (sample_rate_hz) {
26 case 8000: 26 case 8000:
27 return ResourcePath("far8_stereo", "pcm"); 27 return ResourcePath("far8_stereo", "pcm");
28 case 16000: 28 case 16000:
29 return ResourcePath("far16_stereo", "pcm"); 29 return ResourcePath("far16_stereo", "pcm");
30 case 32000: 30 case 32000:
31 return ResourcePath("far32_stereo", "pcm"); 31 return ResourcePath("far32_stereo", "pcm");
32 case 48000: 32 case 48000:
33 return ResourcePath("far48_stereo", "pcm"); 33 return ResourcePath("far48_stereo", "pcm");
34 default: 34 default:
35 RTC_DCHECK(false); 35 RTC_NOTREACHED();
36 } 36 }
37 return ""; 37 return "";
38 } 38 }
39 39
40 std::string GetApmCaptureTestVectorFileName(int sample_rate_hz) { 40 std::string GetApmCaptureTestVectorFileName(int sample_rate_hz) {
41 switch (sample_rate_hz) { 41 switch (sample_rate_hz) {
42 case 8000: 42 case 8000:
43 return ResourcePath("near8_stereo", "pcm"); 43 return ResourcePath("near8_stereo", "pcm");
44 case 16000: 44 case 16000:
45 return ResourcePath("near16_stereo", "pcm"); 45 return ResourcePath("near16_stereo", "pcm");
46 case 32000: 46 case 32000:
47 return ResourcePath("near32_stereo", "pcm"); 47 return ResourcePath("near32_stereo", "pcm");
48 case 48000: 48 case 48000:
49 return ResourcePath("near48_stereo", "pcm"); 49 return ResourcePath("near48_stereo", "pcm");
50 default: 50 default:
51 RTC_DCHECK(false); 51 RTC_NOTREACHED();
52 } 52 }
53 return ""; 53 return "";
54 } 54 }
55 55
56 void ReadFloatSamplesFromStereoFile(size_t samples_per_channel, 56 void ReadFloatSamplesFromStereoFile(size_t samples_per_channel,
57 size_t num_channels, 57 size_t num_channels,
58 InputAudioFile* stereo_pcm_file, 58 InputAudioFile* stereo_pcm_file,
59 rtc::ArrayView<float> data) { 59 rtc::ArrayView<float> data) {
60 RTC_DCHECK_EQ(data.size(), samples_per_channel * num_channels); 60 RTC_DCHECK_EQ(data.size(), samples_per_channel * num_channels);
61 std::vector<int16_t> read_samples(samples_per_channel * 2); 61 std::vector<int16_t> read_samples(samples_per_channel * 2);
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 << " Actual values : " 137 << " Actual values : "
138 << print_vector_in_c_format(output, 138 << print_vector_in_c_format(output,
139 std::min(output.size(), reference.size())) 139 std::min(output.size(), reference.size()))
140 << std::endl 140 << std::endl
141 << " Expected values: " 141 << " Expected values: "
142 << print_vector_in_c_format(reference, reference.size()) << std::endl; 142 << print_vector_in_c_format(reference, reference.size()) << std::endl;
143 } 143 }
144 144
145 } // namespace test 145 } // namespace test
146 } // namespace webrtc 146 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/audio_processing/ns/nsx_core.c ('k') | webrtc/modules/desktop_capture/screen_drawer_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698