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

Unified Diff: remoting/host/audio_capturer_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
« no previous file with comments | « media/audio/win/core_audio_util_win.cc ('k') | ui/base/dragdrop/os_exchange_data_provider_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/audio_capturer_win.cc
diff --git a/remoting/host/audio_capturer_win.cc b/remoting/host/audio_capturer_win.cc
index aa9d36a291bb0a81080ccc7706c66e3f965fc2b5..1250ca4d9b944418aee11c2ac94da45e9893fffa 100644
--- a/remoting/host/audio_capturer_win.cc
+++ b/remoting/host/audio_capturer_win.cc
@@ -7,6 +7,7 @@
#include <avrt.h>
#include <mmreg.h>
#include <mmsystem.h>
+#include <objbase.h>
#include <stdint.h>
#include <stdlib.h>
#include <windows.h>
@@ -124,7 +125,7 @@ bool AudioCapturerWin::Initialize() {
hr = mm_device_->Activate(__uuidof(IAudioClient),
CLSCTX_ALL,
nullptr,
- audio_client_.ReceiveVoid());
+ &audio_client_);
if (FAILED(hr)) {
LOG(ERROR) << "Failed to get an IAudioClient. Error " << hr;
return false;
@@ -219,8 +220,7 @@ bool AudioCapturerWin::Initialize() {
}
// Get an IAudioCaptureClient.
- hr = audio_client_->GetService(__uuidof(IAudioCaptureClient),
- audio_capture_client_.ReceiveVoid());
+ hr = audio_client_->GetService(IID_PPV_ARGS(&audio_capture_client_));
if (FAILED(hr)) {
LOG(ERROR) << "Failed to get an IAudioCaptureClient. Error " << hr;
return false;
@@ -236,7 +236,7 @@ bool AudioCapturerWin::Initialize() {
// Initialize IAudioEndpointVolume.
// TODO(zijiehe): Do we need to control per process volume?
hr = mm_device_->Activate(__uuidof(IAudioEndpointVolume), CLSCTX_ALL, nullptr,
- audio_volume_.ReceiveVoid());
+ &audio_volume_);
if (FAILED(hr)) {
LOG(ERROR) << "Failed to get an IAudioEndpointVolume. Error " << hr;
return false;
« no previous file with comments | « media/audio/win/core_audio_util_win.cc ('k') | ui/base/dragdrop/os_exchange_data_provider_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698