| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "ash/system/win/audio/tray_audio_delegate_win.h" | 5 #include "ash/system/win/audio/tray_audio_delegate_win.h" |
| 6 | 6 |
| 7 #include <audiopolicy.h> | 7 #include <audiopolicy.h> |
| 8 #include <cmath> | 8 #include <cmath> |
| 9 | 9 |
| 10 #include "media/audio/win/core_audio_util_win.h" | 10 #include "media/audio/win/core_audio_util_win.h" |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 return; | 89 return; |
| 90 | 90 |
| 91 float volume_level = static_cast<float>(level) / 100.0f; | 91 float volume_level = static_cast<float>(level) / 100.0f; |
| 92 volume_control->SetMasterVolume(volume_level, NULL); | 92 volume_control->SetMasterVolume(volume_level, NULL); |
| 93 } | 93 } |
| 94 | 94 |
| 95 void TrayAudioDelegateWin::SetInternalSpeakerChannelMode( | 95 void TrayAudioDelegateWin::SetInternalSpeakerChannelMode( |
| 96 AudioChannelMode mode) { | 96 AudioChannelMode mode) { |
| 97 } | 97 } |
| 98 | 98 |
| 99 void TrayAudioDelegateWin::SetActiveHDMIOutoutRediscoveringIfNecessary( |
| 100 bool force_rediscovering) { |
| 101 } |
| 102 |
| 99 ScopedComPtr<ISimpleAudioVolume> | 103 ScopedComPtr<ISimpleAudioVolume> |
| 100 TrayAudioDelegateWin::CreateDefaultVolumeControl() { | 104 TrayAudioDelegateWin::CreateDefaultVolumeControl() { |
| 101 ScopedComPtr<ISimpleAudioVolume> volume_control; | 105 ScopedComPtr<ISimpleAudioVolume> volume_control; |
| 102 ScopedComPtr<IAudioSessionManager> session_manager; | 106 ScopedComPtr<IAudioSessionManager> session_manager; |
| 103 | 107 |
| 104 ScopedComPtr<IMMDevice> device = | 108 ScopedComPtr<IMMDevice> device = |
| 105 media::CoreAudioUtil::CreateDefaultDevice(eRender, eConsole); | 109 media::CoreAudioUtil::CreateDefaultDevice(eRender, eConsole); |
| 106 if (!device.get() || | 110 if (!device.get() || |
| 107 FAILED(device->Activate(__uuidof(IAudioSessionManager), CLSCTX_ALL, NULL, | 111 FAILED(device->Activate(__uuidof(IAudioSessionManager), CLSCTX_ALL, NULL, |
| 108 session_manager.ReceiveVoid()))) { | 112 session_manager.ReceiveVoid()))) { |
| 109 return volume_control; | 113 return volume_control; |
| 110 } | 114 } |
| 111 | 115 |
| 112 session_manager->GetSimpleAudioVolume(NULL, FALSE, | 116 session_manager->GetSimpleAudioVolume(NULL, FALSE, |
| 113 volume_control.Receive()); | 117 volume_control.Receive()); |
| 114 | 118 |
| 115 return volume_control; | 119 return volume_control; |
| 116 } | 120 } |
| 117 | 121 |
| 118 } // namespace system | 122 } // namespace system |
| 119 } // namespace ash | 123 } // namespace ash |
| OLD | NEW |