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

Side by Side Diff: webrtc/modules/audio_device/test/func_test_manager.cc

Issue 1722083002: Replace scoped_ptr with unique_ptr in webrtc/modules/audio_device/ (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: 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
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 576 matching lines...) Expand 10 before | Expand all | Expand 10 after
587 _playoutFile8 = webrtc::test::ResourcePath("audio_device\\audio_short8", 587 _playoutFile8 = webrtc::test::ResourcePath("audio_device\\audio_short8",
588 "pcm"); 588 "pcm");
589 } 589 }
590 590
591 FuncTestManager::~FuncTestManager() 591 FuncTestManager::~FuncTestManager()
592 { 592 {
593 } 593 }
594 594
595 int32_t FuncTestManager::Init() 595 int32_t FuncTestManager::Init()
596 { 596 {
597 EXPECT_TRUE((_processThread = ProcessThread::Create("ProcessThread")) != 597 EXPECT_TRUE((_processThread = rtc::ScopedToUnique(
598 NULL); 598 ProcessThread::Create("ProcessThread"))) != NULL);
599 if (_processThread == NULL) 599 if (_processThread == NULL)
600 { 600 {
601 return -1; 601 return -1;
602 } 602 }
603 _processThread->Start(); 603 _processThread->Start();
604 604
605 // create the Audio Device module 605 // create the Audio Device module
606 EXPECT_TRUE((_audioDevice = AudioDeviceModuleImpl::Create( 606 EXPECT_TRUE((_audioDevice = AudioDeviceModuleImpl::Create(
607 555, ADM_AUDIO_LAYER)) != NULL); 607 555, ADM_AUDIO_LAYER)) != NULL);
608 if (_audioDevice == NULL) 608 if (_audioDevice == NULL)
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
825 // release the AudioDeviceModule object 825 // release the AudioDeviceModule object
826 if (_audioDevice) 826 if (_audioDevice)
827 { 827 {
828 EXPECT_EQ(0, _audioDevice->Release()); 828 EXPECT_EQ(0, _audioDevice->Release());
829 _audioDevice = NULL; 829 _audioDevice = NULL;
830 } 830 }
831 831
832 // ================================================== 832 // ==================================================
833 // Next, try to make fresh start with new audio layer 833 // Next, try to make fresh start with new audio layer
834 834
835 EXPECT_TRUE((_processThread = ProcessThread::Create("ProcessThread")) != 835 EXPECT_TRUE((_processThread = rtc::ScopedToUnique(
836 NULL); 836 ProcessThread::Create("ProcessThread"))) != NULL);
837 if (_processThread == NULL) 837 if (_processThread == NULL)
838 { 838 {
839 return -1; 839 return -1;
840 } 840 }
841 _processThread->Start(); 841 _processThread->Start();
842 842
843 // create the Audio Device module based on selected audio layer 843 // create the Audio Device module based on selected audio layer
844 if (tryWinWave) 844 if (tryWinWave)
845 { 845 {
846 _audioDevice = AudioDeviceModuleImpl::Create( 846 _audioDevice = AudioDeviceModuleImpl::Create(
(...skipping 1891 matching lines...) Expand 10 before | Expand all | Expand 10 after
2738 2738
2739 TEST_LOG("\n"); 2739 TEST_LOG("\n");
2740 PRINT_TEST_RESULTS; 2740 PRINT_TEST_RESULTS;
2741 2741
2742 return 0; 2742 return 0;
2743 } 2743 }
2744 2744
2745 } // namespace webrtc 2745 } // namespace webrtc
2746 2746
2747 // EOF 2747 // EOF
OLDNEW
« no previous file with comments | « webrtc/modules/audio_device/test/func_test_manager.h ('k') | webrtc/modules/audio_device/win/audio_device_wave_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698