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

Side by Side Diff: webrtc/modules/audio_coding/neteq/audio_decoder_unittest.cc

Issue 1335923002: Add RTC_ prefix to (D)CHECKs and related macros. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebase. Created 5 years, 3 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 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 133
134 virtual void InitEncoder() { } 134 virtual void InitEncoder() { }
135 135
136 // TODO(henrik.lundin) Change return type to size_t once most/all overriding 136 // TODO(henrik.lundin) Change return type to size_t once most/all overriding
137 // implementations are gone. 137 // implementations are gone.
138 virtual int EncodeFrame(const int16_t* input, 138 virtual int EncodeFrame(const int16_t* input,
139 size_t input_len_samples, 139 size_t input_len_samples,
140 uint8_t* output) { 140 uint8_t* output) {
141 encoded_info_.encoded_bytes = 0; 141 encoded_info_.encoded_bytes = 0;
142 const size_t samples_per_10ms = audio_encoder_->SampleRateHz() / 100; 142 const size_t samples_per_10ms = audio_encoder_->SampleRateHz() / 100;
143 CHECK_EQ(samples_per_10ms * audio_encoder_->Num10MsFramesInNextPacket(), 143 RTC_CHECK_EQ(samples_per_10ms * audio_encoder_->Num10MsFramesInNextPacket(),
144 input_len_samples); 144 input_len_samples);
145 rtc::scoped_ptr<int16_t[]> interleaved_input( 145 rtc::scoped_ptr<int16_t[]> interleaved_input(
146 new int16_t[channels_ * samples_per_10ms]); 146 new int16_t[channels_ * samples_per_10ms]);
147 for (size_t i = 0; i < audio_encoder_->Num10MsFramesInNextPacket(); ++i) { 147 for (size_t i = 0; i < audio_encoder_->Num10MsFramesInNextPacket(); ++i) {
148 EXPECT_EQ(0u, encoded_info_.encoded_bytes); 148 EXPECT_EQ(0u, encoded_info_.encoded_bytes);
149 149
150 // Duplicate the mono input signal to however many channels the test 150 // Duplicate the mono input signal to however many channels the test
151 // wants. 151 // wants.
152 test::InputAudioFile::DuplicateInterleaved(input + i * samples_per_10ms, 152 test::InputAudioFile::DuplicateInterleaved(input + i * samples_per_10ms,
153 samples_per_10ms, channels_, 153 samples_per_10ms, channels_,
154 interleaved_input.get()); 154 interleaved_input.get());
(...skipping 567 matching lines...) Expand 10 before | Expand all | Expand 10 after
722 EXPECT_TRUE(CodecSupported(kDecoderCNGnb)); 722 EXPECT_TRUE(CodecSupported(kDecoderCNGnb));
723 EXPECT_TRUE(CodecSupported(kDecoderCNGwb)); 723 EXPECT_TRUE(CodecSupported(kDecoderCNGwb));
724 EXPECT_TRUE(CodecSupported(kDecoderCNGswb32kHz)); 724 EXPECT_TRUE(CodecSupported(kDecoderCNGswb32kHz));
725 EXPECT_TRUE(CodecSupported(kDecoderCNGswb48kHz)); 725 EXPECT_TRUE(CodecSupported(kDecoderCNGswb48kHz));
726 EXPECT_TRUE(CodecSupported(kDecoderArbitrary)); 726 EXPECT_TRUE(CodecSupported(kDecoderArbitrary));
727 EXPECT_TRUE(CodecSupported(kDecoderOpus)); 727 EXPECT_TRUE(CodecSupported(kDecoderOpus));
728 EXPECT_TRUE(CodecSupported(kDecoderOpus_2ch)); 728 EXPECT_TRUE(CodecSupported(kDecoderOpus_2ch));
729 } 729 }
730 730
731 } // namespace webrtc 731 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/audio_coding/neteq/audio_decoder_impl.cc ('k') | webrtc/modules/audio_coding/neteq/dtmf_buffer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698