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

Unified Diff: media/audio/win/audio_low_latency_input_win.cc

Issue 2850683002: Remove ScopedComPtr::ReceiveVoid and Add ScopedComPtrRef (Closed)
Patch Set: Add Explicit Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: media/audio/win/audio_low_latency_input_win.cc
diff --git a/media/audio/win/audio_low_latency_input_win.cc b/media/audio/win/audio_low_latency_input_win.cc
index 7fba7b0e4eaf1e3254945d3b5de272c27526405b..4169554081802754f48f49b995e88c20d641d1fb 100644
--- a/media/audio/win/audio_low_latency_input_win.cc
+++ b/media/audio/win/audio_low_latency_input_win.cc
@@ -4,6 +4,8 @@
#include "media/audio/win/audio_low_latency_input_win.h"
+#include <objbase.h>
+
#include <cmath>
#include <memory>
@@ -124,7 +126,7 @@ bool WASAPIAudioInputStream::Open() {
// Obtain an IAudioClient interface which enables us to create and initialize
// an audio stream between an audio application and the audio engine.
hr = endpoint_device_->Activate(__uuidof(IAudioClient), CLSCTX_INPROC_SERVER,
- NULL, audio_client_.ReceiveVoid());
+ NULL, &audio_client_);
if (FAILED(hr)) {
open_result_ = OPEN_RESULT_ACTIVATION_FAILED;
ReportOpenResult();
@@ -377,7 +379,7 @@ void WASAPIAudioInputStream::Run() {
audio_samples_ready_event_.Get()};
base::win::ScopedComPtr<IAudioClock> audio_clock;
- audio_client_->GetService(__uuidof(IAudioClock), audio_clock.ReceiveVoid());
+ audio_client_->GetService(IID_PPV_ARGS(&audio_clock));
while (recording && !error) {
HRESULT hr = S_FALSE;
@@ -536,7 +538,7 @@ HRESULT WASAPIAudioInputStream::SetCaptureDevice() {
endpoint_device_.Receive());
endpoint_device_->Activate(__uuidof(IAudioEndpointVolume), CLSCTX_ALL, NULL,
- system_audio_volume_.ReceiveVoid());
+ &system_audio_volume_);
} else if (device_id_ == AudioDeviceDescription::kLoopbackInputDeviceId) {
// Capture the default playback stream.
hr = enumerator->GetDefaultAudioEndpoint(eRender, eConsole,
@@ -777,7 +779,7 @@ HRESULT WASAPIAudioInputStream::InitializeAudioEngine() {
device_id_ == AudioDeviceDescription::kLoopbackWithMuteDeviceId) {
hr = endpoint_device_->Activate(
__uuidof(IAudioClient), CLSCTX_INPROC_SERVER, NULL,
- audio_render_client_for_loopback_.ReceiveVoid());
+ &audio_render_client_for_loopback_);
if (FAILED(hr)) {
open_result_ = OPEN_RESULT_LOOPBACK_ACTIVATE_FAILED;
return hr;
@@ -805,8 +807,7 @@ HRESULT WASAPIAudioInputStream::InitializeAudioEngine() {
// Get access to the IAudioCaptureClient interface. This interface
// enables us to read input data from the capture endpoint buffer.
- hr = audio_client_->GetService(__uuidof(IAudioCaptureClient),
- audio_capture_client_.ReceiveVoid());
+ hr = audio_client_->GetService(IID_PPV_ARGS(&audio_capture_client_));
if (FAILED(hr)) {
open_result_ = OPEN_RESULT_NO_CAPTURE_CLIENT;
return hr;
@@ -814,8 +815,7 @@ HRESULT WASAPIAudioInputStream::InitializeAudioEngine() {
// Obtain a reference to the ISimpleAudioVolume interface which enables
// us to control the master volume level of an audio session.
- hr = audio_client_->GetService(__uuidof(ISimpleAudioVolume),
- simple_audio_volume_.ReceiveVoid());
+ hr = audio_client_->GetService(IID_PPV_ARGS(&simple_audio_volume_));
if (FAILED(hr))
open_result_ = OPEN_RESULT_NO_AUDIO_VOLUME;
« no previous file with comments | « content/browser/accessibility/accessibility_win_browsertest.cc ('k') | media/audio/win/core_audio_util_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698