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

Side by Side Diff: media/audio/win/audio_low_latency_output_win.cc

Issue 598243002: Remove implicit HANDLE conversions from media. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
« no previous file with comments | « media/audio/win/audio_low_latency_input_win.cc ('k') | media/audio/win/wavein_input_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/command_line.h" 9 #include "base/command_line.h"
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after
349 // Failed to enable MMCSS on this thread. It is not fatal but can lead 349 // Failed to enable MMCSS on this thread. It is not fatal but can lead
350 // to reduced QoS at high load. 350 // to reduced QoS at high load.
351 DWORD err = GetLastError(); 351 DWORD err = GetLastError();
352 LOG(WARNING) << "Failed to enable MMCSS (error code=" << err << ")."; 352 LOG(WARNING) << "Failed to enable MMCSS (error code=" << err << ").";
353 } 353 }
354 354
355 HRESULT hr = S_FALSE; 355 HRESULT hr = S_FALSE;
356 356
357 bool playing = true; 357 bool playing = true;
358 bool error = false; 358 bool error = false;
359 HANDLE wait_array[] = { stop_render_event_, 359 HANDLE wait_array[] = { stop_render_event_.Get(),
360 audio_samples_render_event_ }; 360 audio_samples_render_event_.Get() };
361 UINT64 device_frequency = 0; 361 UINT64 device_frequency = 0;
362 362
363 // The device frequency is the frequency generated by the hardware clock in 363 // The device frequency is the frequency generated by the hardware clock in
364 // the audio device. The GetFrequency() method reports a constant frequency. 364 // the audio device. The GetFrequency() method reports a constant frequency.
365 hr = audio_clock_->GetFrequency(&device_frequency); 365 hr = audio_clock_->GetFrequency(&device_frequency);
366 error = FAILED(hr); 366 error = FAILED(hr);
367 PLOG_IF(ERROR, error) << "Failed to acquire IAudioClock interface: " 367 PLOG_IF(ERROR, error) << "Failed to acquire IAudioClock interface: "
368 << std::hex << hr; 368 << std::hex << hr;
369 369
370 // Keep rendering audio until the stop event or the stream-switch event 370 // Keep rendering audio until the stop event or the stream-switch event
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
620 620
621 // Ensure that we don't quit the main thread loop immediately next 621 // Ensure that we don't quit the main thread loop immediately next
622 // time Start() is called. 622 // time Start() is called.
623 ResetEvent(stop_render_event_.Get()); 623 ResetEvent(stop_render_event_.Get());
624 } 624 }
625 625
626 source_ = NULL; 626 source_ = NULL;
627 } 627 }
628 628
629 } // namespace media 629 } // namespace media
OLDNEW
« no previous file with comments | « media/audio/win/audio_low_latency_input_win.cc ('k') | media/audio/win/wavein_input_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698