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

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

Issue 1694353003: iOS: Add resource files for tests and implement OutputPath (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Fix ifdef for Android build Created 4 years, 10 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
« no previous file with comments | « webrtc/media/media_tests.gypi ('k') | webrtc/modules/audio_coding/neteq/neteq.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 squared_sum += (input[n] - output[channels * n + delay]) * 89 squared_sum += (input[n] - output[channels * n + delay]) *
90 (input[n] - output[channels * n + delay]); 90 (input[n] - output[channels * n + delay]);
91 } 91 }
92 return squared_sum / (num_samples - delay); 92 return squared_sum / (num_samples - delay);
93 } 93 }
94 } // namespace 94 } // namespace
95 95
96 class AudioDecoderTest : public ::testing::Test { 96 class AudioDecoderTest : public ::testing::Test {
97 protected: 97 protected:
98 AudioDecoderTest() 98 AudioDecoderTest()
99 : input_audio_(webrtc::test::ProjectRootPath() + 99 : input_audio_(
100 "resources/audio_coding/testfile32kHz.pcm", 100 webrtc::test::ResourcePath("audio_coding/testfile32kHz", "pcm"),
101 32000), 101 32000),
102 codec_input_rate_hz_(32000), // Legacy default value. 102 codec_input_rate_hz_(32000), // Legacy default value.
103 encoded_(NULL), 103 encoded_(NULL),
104 frame_size_(0), 104 frame_size_(0),
105 data_length_(0), 105 data_length_(0),
106 encoded_bytes_(0), 106 encoded_bytes_(0),
107 channels_(1), 107 channels_(1),
108 payload_type_(17), 108 payload_type_(17),
109 decoder_(NULL) {} 109 decoder_(NULL) {}
110 110
111 virtual ~AudioDecoderTest() {} 111 virtual ~AudioDecoderTest() {}
(...skipping 630 matching lines...) Expand 10 before | Expand all | Expand 10 after
742 EXPECT_TRUE(CodecSupported(NetEqDecoder::kDecoderCNGnb)); 742 EXPECT_TRUE(CodecSupported(NetEqDecoder::kDecoderCNGnb));
743 EXPECT_TRUE(CodecSupported(NetEqDecoder::kDecoderCNGwb)); 743 EXPECT_TRUE(CodecSupported(NetEqDecoder::kDecoderCNGwb));
744 EXPECT_TRUE(CodecSupported(NetEqDecoder::kDecoderCNGswb32kHz)); 744 EXPECT_TRUE(CodecSupported(NetEqDecoder::kDecoderCNGswb32kHz));
745 EXPECT_TRUE(CodecSupported(NetEqDecoder::kDecoderCNGswb48kHz)); 745 EXPECT_TRUE(CodecSupported(NetEqDecoder::kDecoderCNGswb48kHz));
746 EXPECT_TRUE(CodecSupported(NetEqDecoder::kDecoderArbitrary)); 746 EXPECT_TRUE(CodecSupported(NetEqDecoder::kDecoderArbitrary));
747 EXPECT_EQ(has_opus, CodecSupported(NetEqDecoder::kDecoderOpus)); 747 EXPECT_EQ(has_opus, CodecSupported(NetEqDecoder::kDecoderOpus));
748 EXPECT_EQ(has_opus, CodecSupported(NetEqDecoder::kDecoderOpus_2ch)); 748 EXPECT_EQ(has_opus, CodecSupported(NetEqDecoder::kDecoderOpus_2ch));
749 } 749 }
750 750
751 } // namespace webrtc 751 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/media/media_tests.gypi ('k') | webrtc/modules/audio_coding/neteq/neteq.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698