Chromium Code Reviews| Index: media/audio/linux/audio_manager_linux.cc |
| diff --git a/media/audio/linux/audio_manager_linux.cc b/media/audio/linux/audio_manager_linux.cc |
| index 4d6e2a3b6e26181d27c3a0da7952746e519a23ba..10dc36f2cd8401f160331198edd179395a911cba 100644 |
| --- a/media/audio/linux/audio_manager_linux.cc |
| +++ b/media/audio/linux/audio_manager_linux.cc |
| @@ -16,6 +16,7 @@ |
| #include "media/audio/linux/alsa_input.h" |
| #include "media/audio/linux/alsa_output.h" |
| #include "media/audio/linux/alsa_wrapper.h" |
| +#include "media/audio/linux/pulse_output.h" |
|
Paweł Hajdan Jr.
2011/08/09 16:32:51
This header includes PA headers. audio_manager_lin
slock
2011/08/09 18:13:55
Done.
|
| #include "media/base/limits.h" |
| #include "media/base/media_switches.h" |
| @@ -99,15 +100,20 @@ AudioOutputStream* AudioManagerLinux::MakeAudioOutputStream( |
| return NULL; |
| } |
| - std::string device_name = AlsaPcmOutputStream::kAutoSelectDevice; |
| - if (CommandLine::ForCurrentProcess()->HasSwitch( |
| - switches::kAlsaOutputDevice)) { |
| - device_name = CommandLine::ForCurrentProcess()->GetSwitchValueASCII( |
| - switches::kAlsaOutputDevice); |
| + bool pulse = true; |
| + AudioOutputStream* stream; |
| + if (pulse) { |
| + stream = new PulseAudioOutputStream(params, this); |
| + } else { |
| + std::string device_name = AlsaPcmOutputStream::kAutoSelectDevice; |
|
Paweł Hajdan Jr.
2011/08/09 16:32:51
Isn't this dead code? |pulse| is always true.
slock
2011/08/09 18:13:55
Yes it was, and it shouldn't have been there. I t
|
| + if (CommandLine::ForCurrentProcess()->HasSwitch( |
| + switches::kAlsaOutputDevice)) { |
| + device_name = CommandLine::ForCurrentProcess()->GetSwitchValueASCII( |
| + switches::kAlsaOutputDevice); |
| + } |
| + stream = new AlsaPcmOutputStream(device_name, params, wrapper_.get(), this, |
| + GetMessageLoop()); |
| } |
| - AlsaPcmOutputStream* stream = |
| - new AlsaPcmOutputStream(device_name, params, wrapper_.get(), this, |
| - GetMessageLoop()); |
| active_streams_.insert(stream); |
| return stream; |
| } |
| @@ -170,7 +176,7 @@ void AudioManagerLinux::UnMuteAll() { |
| NOTIMPLEMENTED(); |
| } |
| -void AudioManagerLinux::ReleaseOutputStream(AlsaPcmOutputStream* stream) { |
| +void AudioManagerLinux::ReleaseOutputStream(AudioOutputStream* stream) { |
| if (stream) { |
| active_streams_.erase(stream); |
| delete stream; |