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( |
| + media::AudioDeviceNames* device_names) { |
| + // TODO(xians): query a full list of valid devices. |
|
scherkus (not reviewing)
2011/05/26 06:13:12
would it hurt to leave this as NOTIMPLEMENTED()?
xians
2011/05/26 13:54:57
They are actually very good questions.
The story i
|
| + if (HasAudioInputDevices()) { |
| + // Add the default device to the list. |
| + // We use (device_name)_(index) to make up the unique_ids to identify the |
|
scherkus (not reviewing)
2011/05/26 06:13:12
I don't quite understand the need for unique IDs
xians
2011/05/26 13:54:57
I was also thinking about it before, but I decided
xians
2011/05/26 13:54:57
Sorry for the bad design here.
There are two ways
scherkus (not reviewing)
2011/05/27 19:10:36
Ignore my other comment... but I do like this bett
scherkus (not reviewing)
2011/05/27 19:10:36
OK... what about integers? If we're enumerating?
|
| + // devices. For default device, the index is 0, so its unique_id is |
| + // Default_0. |
| + media::AudioDeviceName 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); |