| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |