| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2014 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 759 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 770 } | 770 } |
| 771 | 771 |
| 772 void RegisterCodec() override { | 772 void RegisterCodec() override { |
| 773 static_assert(kSampleRateHz == 16000, "test designed for iSAC 16 kHz"); | 773 static_assert(kSampleRateHz == 16000, "test designed for iSAC 16 kHz"); |
| 774 AudioCodingModule::Codec("ISAC", &codec_, kSampleRateHz, 1); | 774 AudioCodingModule::Codec("ISAC", &codec_, kSampleRateHz, 1); |
| 775 codec_.pltype = kPayloadType; | 775 codec_.pltype = kPayloadType; |
| 776 | 776 |
| 777 // Register iSAC codec in ACM, effectively unregistering the PCM16B codec | 777 // Register iSAC codec in ACM, effectively unregistering the PCM16B codec |
| 778 // registered in AudioCodingModuleTestOldApi::SetUp(); | 778 // registered in AudioCodingModuleTestOldApi::SetUp(); |
| 779 // Only register the decoder for now. The encoder is registered later. | 779 // Only register the decoder for now. The encoder is registered later. |
| 780 ASSERT_EQ(0, acm_->RegisterReceiveCodec(codec_)); | 780 ASSERT_EQ(true, acm_->RegisterReceiveCodec(codec_.pltype, |
| 781 CodecInstToSdp(codec_))); |
| 781 } | 782 } |
| 782 | 783 |
| 783 void StartThreads() { | 784 void StartThreads() { |
| 784 receive_thread_.Start(); | 785 receive_thread_.Start(); |
| 785 receive_thread_.SetPriority(rtc::kRealtimePriority); | 786 receive_thread_.SetPriority(rtc::kRealtimePriority); |
| 786 codec_registration_thread_.Start(); | 787 codec_registration_thread_.Start(); |
| 787 codec_registration_thread_.SetPriority(rtc::kRealtimePriority); | 788 codec_registration_thread_.SetPriority(rtc::kRealtimePriority); |
| 788 } | 789 } |
| 789 | 790 |
| 790 void TearDown() override { | 791 void TearDown() override { |
| (...skipping 1043 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1834 Run(16000, 8000, 1000); | 1835 Run(16000, 8000, 1000); |
| 1835 } | 1836 } |
| 1836 | 1837 |
| 1837 TEST_F(AcmSwitchingOutputFrequencyOldApi, Toggle8KhzTo16Khz) { | 1838 TEST_F(AcmSwitchingOutputFrequencyOldApi, Toggle8KhzTo16Khz) { |
| 1838 Run(8000, 16000, 1000); | 1839 Run(8000, 16000, 1000); |
| 1839 } | 1840 } |
| 1840 | 1841 |
| 1841 #endif | 1842 #endif |
| 1842 | 1843 |
| 1843 } // namespace webrtc | 1844 } // namespace webrtc |
| OLD | NEW |