| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/alsa/audio_manager_alsa.h" | 5 #include "media/audio/alsa/audio_manager_alsa.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/environment.h" | 8 #include "base/environment.h" |
| 9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 276 } | 276 } |
| 277 | 277 |
| 278 AudioOutputStream* AudioManagerAlsa::MakeLinearOutputStream( | 278 AudioOutputStream* AudioManagerAlsa::MakeLinearOutputStream( |
| 279 const AudioParameters& params) { | 279 const AudioParameters& params) { |
| 280 DCHECK_EQ(AudioParameters::AUDIO_PCM_LINEAR, params.format()); | 280 DCHECK_EQ(AudioParameters::AUDIO_PCM_LINEAR, params.format()); |
| 281 return MakeOutputStream(params); | 281 return MakeOutputStream(params); |
| 282 } | 282 } |
| 283 | 283 |
| 284 AudioOutputStream* AudioManagerAlsa::MakeLowLatencyOutputStream( | 284 AudioOutputStream* AudioManagerAlsa::MakeLowLatencyOutputStream( |
| 285 const AudioParameters& params, | 285 const AudioParameters& params, |
| 286 const std::string& device_id, | 286 const std::string& device_id) { |
| 287 const std::string& input_device_id) { | |
| 288 DLOG_IF(ERROR, !device_id.empty()) << "Not implemented!"; | 287 DLOG_IF(ERROR, !device_id.empty()) << "Not implemented!"; |
| 289 DCHECK_EQ(AudioParameters::AUDIO_PCM_LOW_LATENCY, params.format()); | 288 DCHECK_EQ(AudioParameters::AUDIO_PCM_LOW_LATENCY, params.format()); |
| 290 // TODO(xians): Use input_device_id for unified IO. | |
| 291 return MakeOutputStream(params); | 289 return MakeOutputStream(params); |
| 292 } | 290 } |
| 293 | 291 |
| 294 AudioInputStream* AudioManagerAlsa::MakeLinearInputStream( | 292 AudioInputStream* AudioManagerAlsa::MakeLinearInputStream( |
| 295 const AudioParameters& params, const std::string& device_id) { | 293 const AudioParameters& params, const std::string& device_id) { |
| 296 DCHECK_EQ(AudioParameters::AUDIO_PCM_LINEAR, params.format()); | 294 DCHECK_EQ(AudioParameters::AUDIO_PCM_LINEAR, params.format()); |
| 297 return MakeInputStream(params, device_id); | 295 return MakeInputStream(params, device_id); |
| 298 } | 296 } |
| 299 | 297 |
| 300 AudioInputStream* AudioManagerAlsa::MakeLowLatencyInputStream( | 298 AudioInputStream* AudioManagerAlsa::MakeLowLatencyInputStream( |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 353 AlsaPcmInputStream::kAutoSelectDevice : device_id; | 351 AlsaPcmInputStream::kAutoSelectDevice : device_id; |
| 354 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kAlsaInputDevice)) { | 352 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kAlsaInputDevice)) { |
| 355 device_name = CommandLine::ForCurrentProcess()->GetSwitchValueASCII( | 353 device_name = CommandLine::ForCurrentProcess()->GetSwitchValueASCII( |
| 356 switches::kAlsaInputDevice); | 354 switches::kAlsaInputDevice); |
| 357 } | 355 } |
| 358 | 356 |
| 359 return new AlsaPcmInputStream(this, device_name, params, wrapper_.get()); | 357 return new AlsaPcmInputStream(this, device_name, params, wrapper_.get()); |
| 360 } | 358 } |
| 361 | 359 |
| 362 } // namespace media | 360 } // namespace media |
| OLD | NEW |