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 #include <objbase.h> |
8 | 9 |
9 #include <climits> | 10 #include <climits> |
10 | 11 |
11 #include "base/command_line.h" | 12 #include "base/command_line.h" |
12 #include "base/logging.h" | 13 #include "base/logging.h" |
13 #include "base/macros.h" | 14 #include "base/macros.h" |
14 #include "base/metrics/histogram.h" | 15 #include "base/metrics/histogram.h" |
15 #include "base/strings/utf_string_conversions.h" | 16 #include "base/strings/utf_string_conversions.h" |
16 #include "base/time/time.h" | 17 #include "base/time/time.h" |
17 #include "base/trace_event/trace_event.h" | 18 #include "base/trace_event/trace_event.h" |
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
233 // a rendering endpoint buffer. | 234 // a rendering endpoint buffer. |
234 ScopedComPtr<IAudioRenderClient> audio_render_client = | 235 ScopedComPtr<IAudioRenderClient> audio_render_client = |
235 CoreAudioUtil::CreateRenderClient(audio_client.Get()); | 236 CoreAudioUtil::CreateRenderClient(audio_client.Get()); |
236 if (!audio_render_client.Get()) | 237 if (!audio_render_client.Get()) |
237 return false; | 238 return false; |
238 | 239 |
239 // Store valid COM interfaces. | 240 // Store valid COM interfaces. |
240 audio_client_ = audio_client; | 241 audio_client_ = audio_client; |
241 audio_render_client_ = audio_render_client; | 242 audio_render_client_ = audio_render_client; |
242 | 243 |
243 hr = audio_client_->GetService(__uuidof(IAudioClock), | 244 hr = audio_client_->GetService(IID_PPV_ARGS(&audio_clock_)); |
244 audio_clock_.ReceiveVoid()); | |
245 if (FAILED(hr)) { | 245 if (FAILED(hr)) { |
246 LOG(ERROR) << "Failed to get IAudioClock service."; | 246 LOG(ERROR) << "Failed to get IAudioClock service."; |
247 return false; | 247 return false; |
248 } | 248 } |
249 | 249 |
250 opened_ = true; | 250 opened_ = true; |
251 return true; | 251 return true; |
252 } | 252 } |
253 | 253 |
254 void WASAPIAudioOutputStream::Start(AudioSourceCallback* callback) { | 254 void WASAPIAudioOutputStream::Start(AudioSourceCallback* callback) { |
(...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
649 | 649 |
650 // Ensure that we don't quit the main thread loop immediately next | 650 // Ensure that we don't quit the main thread loop immediately next |
651 // time Start() is called. | 651 // time Start() is called. |
652 ResetEvent(stop_render_event_.Get()); | 652 ResetEvent(stop_render_event_.Get()); |
653 } | 653 } |
654 | 654 |
655 source_ = NULL; | 655 source_ = NULL; |
656 } | 656 } |
657 | 657 |
658 } // namespace media | 658 } // namespace media |
OLD | NEW |