Chromium Code Reviews| Index: media/audio/cras/audio_manager_cras.cc |
| diff --git a/media/audio/cras/audio_manager_cras.cc b/media/audio/cras/audio_manager_cras.cc |
| index 276487557e0d606fff86f4543d347c597af89ad7..2e524ffeaae8d2d1b5ea44c8bfbc057ea93dbcbb 100644 |
| --- a/media/audio/cras/audio_manager_cras.cc |
| +++ b/media/audio/cras/audio_manager_cras.cc |
| @@ -16,6 +16,19 @@ |
| namespace media { |
| +namespace { |
|
tfarina
2013/09/15 03:17:45
minor-question: hasn't media folks decided to use
Jói
2013/09/16 08:56:45
Not that I know of. Tommi?
tommi (sloooow) - chröme
2013/09/16 10:47:41
Yes, that's correct.
|
| + |
| +void AddDefaultDevice(media::AudioDeviceNames* device_names) { |
|
tfarina
2013/09/15 03:17:45
micro-style-nit: no media:: here.
Jói
2013/09/16 08:56:45
Addressed, although not here (this patch is closed
|
| + DCHECK(device_names->empty()); |
| + |
| + // Cras will route audio from a proper physical device automatically. |
| + device_names->push_back( |
| + AudioDeviceName(AudioManagerBase::kDefaultDeviceName, |
| + AudioManagerBase::kDefaultDeviceId)); |
| +} |
| + |
| +} // namespace |
| + |
| // Maximum number of output streams that can be open simultaneously. |
| static const int kMaxOutputStreams = 50; |
| @@ -46,9 +59,12 @@ void AudioManagerCras::ShowAudioInputSettings() { |
| void AudioManagerCras::GetAudioInputDeviceNames( |
| media::AudioDeviceNames* device_names) { |
| - DCHECK(device_names->empty()); |
| - GetCrasAudioInputDevices(device_names); |
| - return; |
| + AddDefaultDevice(device_names); |
| +} |
| + |
| +void AudioManagerCras::GetAudioOutputDeviceNames( |
| + media::AudioDeviceNames* device_names) { |
| + AddDefaultDevice(device_names); |
| } |
| AudioParameters AudioManagerCras::GetInputStreamParameters( |
| @@ -61,14 +77,6 @@ AudioParameters AudioManagerCras::GetInputStreamParameters( |
| kDefaultSampleRate, 16, kDefaultInputBufferSize); |
| } |
| -void AudioManagerCras::GetCrasAudioInputDevices( |
| - media::AudioDeviceNames* device_names) { |
| - // Cras will route audio from a proper physical device automatically. |
| - device_names->push_back( |
| - AudioDeviceName(AudioManagerBase::kDefaultDeviceName, |
| - AudioManagerBase::kDefaultDeviceId)); |
| -} |
| - |
| AudioOutputStream* AudioManagerCras::MakeLinearOutputStream( |
| const AudioParameters& params) { |
| DCHECK_EQ(AudioParameters::AUDIO_PCM_LINEAR, params.format()); |