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

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

Issue 2144333002: MuteSource Audio During Full Screen Cast (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 4 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') | no next file » | 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/core_audio_util_win.h" 5 #include "media/audio/win/core_audio_util_win.h"
6 6
7 #include <devicetopology.h> 7 #include <devicetopology.h>
8 #include <dxdiag.h> 8 #include <dxdiag.h>
9 #include <functiondiscoverykeys_devpkey.h> 9 #include <functiondiscoverykeys_devpkey.h>
10 #include <stddef.h> 10 #include <stddef.h>
(...skipping 729 matching lines...) Expand 10 before | Expand all | Expand 10 after
740 740
741 HRESULT CoreAudioUtil::GetPreferredAudioParameters(const std::string& device_id, 741 HRESULT CoreAudioUtil::GetPreferredAudioParameters(const std::string& device_id,
742 bool is_output_device, 742 bool is_output_device,
743 AudioParameters* params) { 743 AudioParameters* params) {
744 DCHECK(IsSupported()); 744 DCHECK(IsSupported());
745 745
746 ScopedComPtr<IMMDevice> device; 746 ScopedComPtr<IMMDevice> device;
747 if (device_id == AudioDeviceDescription::kDefaultDeviceId) { 747 if (device_id == AudioDeviceDescription::kDefaultDeviceId) {
748 device = CoreAudioUtil::CreateDefaultDevice( 748 device = CoreAudioUtil::CreateDefaultDevice(
749 is_output_device ? eRender : eCapture, eConsole); 749 is_output_device ? eRender : eCapture, eConsole);
750 } else if (device_id == AudioDeviceDescription::kLoopbackInputDeviceId) { 750 } else if (device_id == AudioDeviceDescription::kLoopbackInputDeviceId ||
751 device_id == AudioDeviceDescription::kLoopbackWithMuteDeviceId) {
751 DCHECK(!is_output_device); 752 DCHECK(!is_output_device);
752 device = CoreAudioUtil::CreateDefaultDevice(eRender, eConsole); 753 device = CoreAudioUtil::CreateDefaultDevice(eRender, eConsole);
753 } else if (device_id == AudioDeviceDescription::kCommunicationsDeviceId) { 754 } else if (device_id == AudioDeviceDescription::kCommunicationsDeviceId) {
754 device = CoreAudioUtil::CreateDefaultDevice( 755 device = CoreAudioUtil::CreateDefaultDevice(
755 is_output_device ? eRender : eCapture, eCommunications); 756 is_output_device ? eRender : eCapture, eCommunications);
756 } else { 757 } else {
757 device = CreateDevice(device_id); 758 device = CreateDevice(device_id);
758 } 759 }
759 760
760 if (!device.get()) { 761 if (!device.get()) {
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
964 965
965 if (variant.type() == VT_BSTR && variant.ptr()->bstrVal) { 966 if (variant.type() == VT_BSTR && variant.ptr()->bstrVal) {
966 base::WideToUTF8(variant.ptr()->bstrVal, wcslen(variant.ptr()->bstrVal), 967 base::WideToUTF8(variant.ptr()->bstrVal, wcslen(variant.ptr()->bstrVal),
967 driver_version); 968 driver_version);
968 } 969 }
969 970
970 return true; 971 return true;
971 } 972 }
972 973
973 } // namespace media 974 } // namespace media
OLDNEW
« no previous file with comments | « media/audio/win/audio_low_latency_input_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698