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 |
19 WASAPIAudioOutputStream::WASAPIAudioOutputStream(AudioManagerWin* manager, | 21 WASAPIAudioOutputStream::WASAPIAudioOutputStream(AudioManagerWin* manager, |
20 const AudioParameters& params, | 22 const AudioParameters& params, |
21 ERole device_role) | 23 ERole device_role) |
22 : com_init_(ScopedCOMInitializer::kMTA), | 24 : com_init_(ScopedCOMInitializer::kMTA), |
23 creating_thread_id_(base::PlatformThread::CurrentId()), | 25 creating_thread_id_(base::PlatformThread::CurrentId()), |
24 manager_(manager), | 26 manager_(manager), |
25 render_thread_(NULL), | 27 render_thread_(NULL), |
26 opened_(false), | 28 opened_(false), |
27 started_(false), | 29 started_(false), |
28 restart_rendering_mode_(false), | 30 restart_rendering_mode_(false), |
(...skipping 772 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
801 | 803 |
802 // All released interfaces (IAudioRenderClient, IAudioClient, IMMDevice) | 804 // All released interfaces (IAudioRenderClient, IAudioClient, IMMDevice) |
803 // are now re-initiated and it is now possible to re-start audio rendering. | 805 // are now re-initiated and it is now possible to re-start audio rendering. |
804 | 806 |
805 // Start rendering again using the new default audio endpoint. | 807 // Start rendering again using the new default audio endpoint. |
806 hr = audio_client_->Start(); | 808 hr = audio_client_->Start(); |
807 | 809 |
808 restart_rendering_mode_ = false; | 810 restart_rendering_mode_ = false; |
809 return SUCCEEDED(hr); | 811 return SUCCEEDED(hr); |
810 } | 812 } |
| 813 |
| 814 } // namespace media |
OLD | NEW |