| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2013 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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 } | 84 } |
| 85 | 85 |
| 86 virtual void SetUp() { | 86 virtual void SetUp() { |
| 87 const std::string file_name = | 87 const std::string file_name = |
| 88 webrtc::test::ResourcePath("audio_coding/testfile32kHz", "pcm"); | 88 webrtc::test::ResourcePath("audio_coding/testfile32kHz", "pcm"); |
| 89 input_file_.reset(new test::InputAudioFile(file_name)); | 89 input_file_.reset(new test::InputAudioFile(file_name)); |
| 90 NetEqDecoder mono_decoder; | 90 NetEqDecoder mono_decoder; |
| 91 NetEqDecoder multi_decoder; | 91 NetEqDecoder multi_decoder; |
| 92 switch (sample_rate_hz_) { | 92 switch (sample_rate_hz_) { |
| 93 case 8000: | 93 case 8000: |
| 94 mono_decoder = kDecoderPCM16B; | 94 mono_decoder = NetEqDecoder::kDecoderPCM16B; |
| 95 if (num_channels_ == 2) { | 95 if (num_channels_ == 2) { |
| 96 multi_decoder = kDecoderPCM16B_2ch; | 96 multi_decoder = NetEqDecoder::kDecoderPCM16B_2ch; |
| 97 } else if (num_channels_ == 5) { | 97 } else if (num_channels_ == 5) { |
| 98 multi_decoder = kDecoderPCM16B_5ch; | 98 multi_decoder = NetEqDecoder::kDecoderPCM16B_5ch; |
| 99 } else { | 99 } else { |
| 100 FAIL() << "Only 2 and 5 channels supported for 8000 Hz."; | 100 FAIL() << "Only 2 and 5 channels supported for 8000 Hz."; |
| 101 } | 101 } |
| 102 break; | 102 break; |
| 103 case 16000: | 103 case 16000: |
| 104 mono_decoder = kDecoderPCM16Bwb; | 104 mono_decoder = NetEqDecoder::kDecoderPCM16Bwb; |
| 105 if (num_channels_ == 2) { | 105 if (num_channels_ == 2) { |
| 106 multi_decoder = kDecoderPCM16Bwb_2ch; | 106 multi_decoder = NetEqDecoder::kDecoderPCM16Bwb_2ch; |
| 107 } else { | 107 } else { |
| 108 FAIL() << "More than 2 channels is not supported for 16000 Hz."; | 108 FAIL() << "More than 2 channels is not supported for 16000 Hz."; |
| 109 } | 109 } |
| 110 break; | 110 break; |
| 111 case 32000: | 111 case 32000: |
| 112 mono_decoder = kDecoderPCM16Bswb32kHz; | 112 mono_decoder = NetEqDecoder::kDecoderPCM16Bswb32kHz; |
| 113 if (num_channels_ == 2) { | 113 if (num_channels_ == 2) { |
| 114 multi_decoder = kDecoderPCM16Bswb32kHz_2ch; | 114 multi_decoder = NetEqDecoder::kDecoderPCM16Bswb32kHz_2ch; |
| 115 } else { | 115 } else { |
| 116 FAIL() << "More than 2 channels is not supported for 32000 Hz."; | 116 FAIL() << "More than 2 channels is not supported for 32000 Hz."; |
| 117 } | 117 } |
| 118 break; | 118 break; |
| 119 case 48000: | 119 case 48000: |
| 120 mono_decoder = kDecoderPCM16Bswb48kHz; | 120 mono_decoder = NetEqDecoder::kDecoderPCM16Bswb48kHz; |
| 121 if (num_channels_ == 2) { | 121 if (num_channels_ == 2) { |
| 122 multi_decoder = kDecoderPCM16Bswb48kHz_2ch; | 122 multi_decoder = NetEqDecoder::kDecoderPCM16Bswb48kHz_2ch; |
| 123 } else { | 123 } else { |
| 124 FAIL() << "More than 2 channels is not supported for 48000 Hz."; | 124 FAIL() << "More than 2 channels is not supported for 48000 Hz."; |
| 125 } | 125 } |
| 126 break; | 126 break; |
| 127 default: | 127 default: |
| 128 FAIL() << "We shouldn't get here."; | 128 FAIL() << "We shouldn't get here."; |
| 129 } | 129 } |
| 130 ASSERT_EQ(NetEq::kOK, | 130 ASSERT_EQ(NetEq::kOK, |
| 131 neteq_mono_->RegisterPayloadType(mono_decoder, | 131 neteq_mono_->RegisterPayloadType(mono_decoder, |
| 132 kPayloadTypeMono)); | 132 kPayloadTypeMono)); |
| (...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 413 | 413 |
| 414 INSTANTIATE_TEST_CASE_P(MultiChannel, | 414 INSTANTIATE_TEST_CASE_P(MultiChannel, |
| 415 NetEqStereoTestDelays, | 415 NetEqStereoTestDelays, |
| 416 ::testing::ValuesIn(GetTestParameters())); | 416 ::testing::ValuesIn(GetTestParameters())); |
| 417 | 417 |
| 418 INSTANTIATE_TEST_CASE_P(MultiChannel, | 418 INSTANTIATE_TEST_CASE_P(MultiChannel, |
| 419 NetEqStereoTestLosses, | 419 NetEqStereoTestLosses, |
| 420 ::testing::ValuesIn(GetTestParameters())); | 420 ::testing::ValuesIn(GetTestParameters())); |
| 421 | 421 |
| 422 } // namespace webrtc | 422 } // namespace webrtc |
| OLD | NEW |