Chromium Code Reviews| Index: media/audio/mac/audio_manager_mac.cc |
| =================================================================== |
| --- media/audio/mac/audio_manager_mac.cc (revision 86276) |
| +++ media/audio/mac/audio_manager_mac.cc (working copy) |
| @@ -4,6 +4,7 @@ |
| #include <CoreAudio/AudioHardware.h> |
| +#include "base/stringprintf.h" |
| #include "base/sys_info.h" |
| #include "media/audio/fake_audio_input_stream.h" |
| #include "media/audio/fake_audio_output_stream.h" |
| @@ -127,6 +128,21 @@ |
| // TODO(cpu): implement. |
| } |
| +void AudioManagerMac::GetAudioInputDeviceNames( |
| + AudioInputDeviceNames* device_names) { |
| + // TODO(xians): query a full list of valid devices. |
| + if (HasAudioInputDevices()) { |
| + // Add the default device to the list. |
|
awong
2011/05/23 17:36:15
Does this make sense in Mac?
xians
2011/05/23 20:15:59
We only prepend the default device to the list to
|
| + // We use (device_name)_(index) to make up the unique_ids to identify the |
| + // devices. For default device, the index is 0, so its unique_id is |
| + // Default_0. |
| + AudioInputDeviceName name; |
| + name.device_name = AudioManagerBase::kDefaultDeviceName; |
| + name.unique_id = StringPrintf("%s_0", AudioManagerBase::kDefaultDeviceName); |
| + device_names->push_back(name); |
| + } |
| +} |
| + |
| // Called by the stream when it has been released by calling Close(). |
| void AudioManagerMac::ReleaseOutputStream(AudioOutputStream* stream) { |
| DCHECK(stream); |