| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include <windows.h> | 5 #include <windows.h> |
| 6 #include <mmsystem.h> | 6 #include <mmsystem.h> |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 AudioManager::CreateForTesting(message_loop_.task_runner()); | 157 AudioManager::CreateForTesting(message_loop_.task_runner()); |
| 158 base::RunLoop().RunUntilIdle(); | 158 base::RunLoop().RunUntilIdle(); |
| 159 } | 159 } |
| 160 ~WinAudioTest() override { | 160 ~WinAudioTest() override { |
| 161 audio_manager_.reset(); | 161 audio_manager_.reset(); |
| 162 base::RunLoop().RunUntilIdle(); | 162 base::RunLoop().RunUntilIdle(); |
| 163 } | 163 } |
| 164 | 164 |
| 165 protected: | 165 protected: |
| 166 base::MessageLoop message_loop_; | 166 base::MessageLoop message_loop_; |
| 167 ScopedAudioManagerPtr audio_manager_; | 167 std::unique_ptr<AudioManager> audio_manager_; |
| 168 }; | 168 }; |
| 169 | 169 |
| 170 // =========================================================================== | 170 // =========================================================================== |
| 171 // Validation of AudioManager::AUDIO_PCM_LINEAR | 171 // Validation of AudioManager::AUDIO_PCM_LINEAR |
| 172 // | 172 // |
| 173 // NOTE: | 173 // NOTE: |
| 174 // The tests can fail on the build bots when somebody connects to them via | 174 // The tests can fail on the build bots when somebody connects to them via |
| 175 // remote-desktop and the rdp client installs an audio device that fails to open | 175 // remote-desktop and the rdp client installs an audio device that fails to open |
| 176 // at some point, possibly when the connection goes idle. | 176 // at some point, possibly when the connection goes idle. |
| 177 | 177 |
| (...skipping 480 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 658 oas->Start(&source); | 658 oas->Start(&source); |
| 659 | 659 |
| 660 ::WaitForSingleObject(thread, INFINITE); | 660 ::WaitForSingleObject(thread, INFINITE); |
| 661 ::CloseHandle(thread); | 661 ::CloseHandle(thread); |
| 662 | 662 |
| 663 oas->Stop(); | 663 oas->Stop(); |
| 664 oas->Close(); | 664 oas->Close(); |
| 665 } | 665 } |
| 666 | 666 |
| 667 } // namespace media | 667 } // namespace media |
| OLD | NEW |