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 "media/audio/win/audio_low_latency_output_win.h" | 5 #include "media/audio/win/audio_low_latency_output_win.h" |
6 | 6 |
7 #include <Functiondiscoverykeys_devpkey.h> | 7 #include <Functiondiscoverykeys_devpkey.h> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
11 #include "base/utf_string_conversions.h" | 11 #include "base/utf_string_conversions.h" |
12 #include "media/audio/audio_util.h" | 12 #include "media/audio/audio_util.h" |
13 #include "media/audio/win/audio_manager_win.h" | 13 #include "media/audio/win/audio_manager_win.h" |
14 #include "media/audio/win/avrt_wrapper_win.h" | 14 #include "media/audio/win/avrt_wrapper_win.h" |
15 | 15 |
16 using base::win::ScopedComPtr; | 16 using base::win::ScopedComPtr; |
17 using base::win::ScopedCOMInitializer; | 17 using base::win::ScopedCOMInitializer; |
18 | 18 |
19 namespace media { | |
20 | |
21 WASAPIAudioOutputStream::WASAPIAudioOutputStream(AudioManagerWin* manager, | 19 WASAPIAudioOutputStream::WASAPIAudioOutputStream(AudioManagerWin* manager, |
22 const AudioParameters& params, | 20 const AudioParameters& params, |
23 ERole device_role) | 21 ERole device_role) |
24 : com_init_(ScopedCOMInitializer::kMTA), | 22 : com_init_(ScopedCOMInitializer::kMTA), |
25 creating_thread_id_(base::PlatformThread::CurrentId()), | 23 creating_thread_id_(base::PlatformThread::CurrentId()), |
26 manager_(manager), | 24 manager_(manager), |
27 render_thread_(NULL), | 25 render_thread_(NULL), |
28 opened_(false), | 26 opened_(false), |
29 started_(false), | 27 started_(false), |
30 restart_rendering_mode_(false), | 28 restart_rendering_mode_(false), |
(...skipping 772 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
803 | 801 |
804 // All released interfaces (IAudioRenderClient, IAudioClient, IMMDevice) | 802 // All released interfaces (IAudioRenderClient, IAudioClient, IMMDevice) |
805 // are now re-initiated and it is now possible to re-start audio rendering. | 803 // are now re-initiated and it is now possible to re-start audio rendering. |
806 | 804 |
807 // Start rendering again using the new default audio endpoint. | 805 // Start rendering again using the new default audio endpoint. |
808 hr = audio_client_->Start(); | 806 hr = audio_client_->Start(); |
809 | 807 |
810 restart_rendering_mode_ = false; | 808 restart_rendering_mode_ = false; |
811 return SUCCEEDED(hr); | 809 return SUCCEEDED(hr); |
812 } | 810 } |
813 | |
814 } // namespace media | |
OLD | NEW |