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 584 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
595 int32_t FuncTestManager::Init() | 595 int32_t FuncTestManager::Init() |
596 { | 596 { |
597 EXPECT_TRUE((_processThread = ProcessThread::Create("ProcessThread")) != | 597 EXPECT_TRUE((_processThread = ProcessThread::Create("ProcessThread")) != |
598 NULL); | 598 NULL); |
599 if (_processThread == NULL) { | 599 if (_processThread == NULL) { |
600 return -1; | 600 return -1; |
601 } | 601 } |
602 _processThread->Start(); | 602 _processThread->Start(); |
603 | 603 |
604 // create the Audio Device module | 604 // create the Audio Device module |
605 EXPECT_TRUE((_audioDevice = AudioDeviceModuleImpl::Create( | 605 EXPECT_TRUE((_audioDevice = AudioDeviceModule::Create( |
606 555, ADM_AUDIO_LAYER)) != NULL); | 606 555, ADM_AUDIO_LAYER)) != NULL); |
607 if (_audioDevice == NULL) | 607 if (_audioDevice == NULL) |
608 { | 608 { |
609 return -1; | 609 return -1; |
610 } | 610 } |
611 EXPECT_EQ(1, _audioDevice->AddRef()); | 611 EXPECT_EQ(1, _audioDevice->AddRef()); |
612 | 612 |
613 // register the Audio Device module | 613 // register the Audio Device module |
614 _processThread->RegisterModule(_audioDevice); | 614 _processThread->RegisterModule(_audioDevice); |
615 | 615 |
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
835 NULL); | 835 NULL); |
836 if (_processThread == NULL) | 836 if (_processThread == NULL) |
837 { | 837 { |
838 return -1; | 838 return -1; |
839 } | 839 } |
840 _processThread->Start(); | 840 _processThread->Start(); |
841 | 841 |
842 // create the Audio Device module based on selected audio layer | 842 // create the Audio Device module based on selected audio layer |
843 if (tryWinWave) | 843 if (tryWinWave) |
844 { | 844 { |
845 _audioDevice = AudioDeviceModuleImpl::Create( | 845 _audioDevice = AudioDeviceModule::Create( |
846 555, | 846 555, |
847 AudioDeviceModule::kWindowsWaveAudio); | 847 AudioDeviceModule::kWindowsWaveAudio); |
848 } else if (tryWinCore) | 848 } else if (tryWinCore) |
849 { | 849 { |
850 _audioDevice = AudioDeviceModuleImpl::Create( | 850 _audioDevice = AudioDeviceModule::Create( |
851 555, | 851 555, |
852 AudioDeviceModule::kWindowsCoreAudio); | 852 AudioDeviceModule::kWindowsCoreAudio); |
853 } | 853 } |
854 | 854 |
855 if (_audioDevice == NULL) | 855 if (_audioDevice == NULL) |
856 { | 856 { |
857 TEST_LOG("\nERROR: Switch of audio layer failed!\n"); | 857 TEST_LOG("\nERROR: Switch of audio layer failed!\n"); |
858 // restore default audio layer instead | 858 // restore default audio layer instead |
859 EXPECT_TRUE((_audioDevice = AudioDeviceModuleImpl::Create( | 859 EXPECT_TRUE((_audioDevice = AudioDeviceModule::Create( |
860 555, AudioDeviceModule::kPlatformDefaultAudio)) != NULL); | 860 555, AudioDeviceModule::kPlatformDefaultAudio)) != NULL); |
861 } | 861 } |
862 | 862 |
863 if (_audioDevice == NULL) | 863 if (_audioDevice == NULL) |
864 { | 864 { |
865 TEST_LOG("\nERROR: Failed to revert back to default audio layer!\n")
; | 865 TEST_LOG("\nERROR: Failed to revert back to default audio layer!\n")
; |
866 return -1; | 866 return -1; |
867 } | 867 } |
868 | 868 |
869 EXPECT_EQ(1, _audioDevice->AddRef()); | 869 EXPECT_EQ(1, _audioDevice->AddRef()); |
(...skipping 1867 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2737 | 2737 |
2738 TEST_LOG("\n"); | 2738 TEST_LOG("\n"); |
2739 PRINT_TEST_RESULTS; | 2739 PRINT_TEST_RESULTS; |
2740 | 2740 |
2741 return 0; | 2741 return 0; |
2742 } | 2742 } |
2743 | 2743 |
2744 } // namespace webrtc | 2744 } // namespace webrtc |
2745 | 2745 |
2746 // EOF | 2746 // EOF |
OLD | NEW |