OLD | NEW |
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/audio_io.h" | 5 #include "media/audio/audio_io.h" |
6 | 6 |
7 #include <windows.h> | 7 #include <windows.h> |
8 #include <objbase.h> // This has to be before initguid.h | 8 #include <objbase.h> // This has to be before initguid.h |
9 #include <initguid.h> | 9 #include <initguid.h> |
10 #include <mmsystem.h> | 10 #include <mmsystem.h> |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 } | 114 } |
115 | 115 |
116 bool AudioManagerWin::HasAudioOutputDevices() { | 116 bool AudioManagerWin::HasAudioOutputDevices() { |
117 return (::waveOutGetNumDevs() != 0); | 117 return (::waveOutGetNumDevs() != 0); |
118 } | 118 } |
119 | 119 |
120 bool AudioManagerWin::HasAudioInputDevices() { | 120 bool AudioManagerWin::HasAudioInputDevices() { |
121 return (::waveInGetNumDevs() != 0); | 121 return (::waveInGetNumDevs() != 0); |
122 } | 122 } |
123 | 123 |
124 void AudioManagerWin::MuteAll() { | |
125 } | |
126 | |
127 void AudioManagerWin::UnMuteAll() { | |
128 } | |
129 | |
130 string16 AudioManagerWin::GetAudioInputDeviceModel() { | 124 string16 AudioManagerWin::GetAudioInputDeviceModel() { |
131 // Get the default audio capture device and its device interface name. | 125 // Get the default audio capture device and its device interface name. |
132 DWORD device_id = 0; | 126 DWORD device_id = 0; |
133 waveInMessage(reinterpret_cast<HWAVEIN>(WAVE_MAPPER), | 127 waveInMessage(reinterpret_cast<HWAVEIN>(WAVE_MAPPER), |
134 DRVM_MAPPER_PREFERRED_GET, | 128 DRVM_MAPPER_PREFERRED_GET, |
135 reinterpret_cast<DWORD_PTR>(&device_id), NULL); | 129 reinterpret_cast<DWORD_PTR>(&device_id), NULL); |
136 ULONG device_interface_name_size = 0; | 130 ULONG device_interface_name_size = 0; |
137 waveInMessage(reinterpret_cast<HWAVEIN>(device_id), | 131 waveInMessage(reinterpret_cast<HWAVEIN>(device_id), |
138 DRV_QUERYDEVICEINTERFACESIZE, | 132 DRV_QUERYDEVICEINTERFACESIZE, |
139 reinterpret_cast<DWORD_PTR>(&device_interface_name_size), 0); | 133 reinterpret_cast<DWORD_PTR>(&device_interface_name_size), 0); |
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
317 return new PCMWaveInAudioInputStream(this, params, kNumInputBuffers, | 311 return new PCMWaveInAudioInputStream(this, params, kNumInputBuffers, |
318 xp_device_id); | 312 xp_device_id); |
319 } | 313 } |
320 | 314 |
321 /// static | 315 /// static |
322 AudioManager* CreateAudioManager() { | 316 AudioManager* CreateAudioManager() { |
323 return new AudioManagerWin(); | 317 return new AudioManagerWin(); |
324 } | 318 } |
325 | 319 |
326 } // namespace media | 320 } // namespace media |
OLD | NEW |