| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/environment.h" | 10 #include "base/environment.h" |
| (...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 284 } | 284 } |
| 285 | 285 |
| 286 AudioOutputStream* AudioManagerAlsa::MakeLinearOutputStream( | 286 AudioOutputStream* AudioManagerAlsa::MakeLinearOutputStream( |
| 287 const AudioParameters& params) { | 287 const AudioParameters& params) { |
| 288 DCHECK_EQ(AudioParameters::AUDIO_PCM_LINEAR, params.format()); | 288 DCHECK_EQ(AudioParameters::AUDIO_PCM_LINEAR, params.format()); |
| 289 return MakeOutputStream(params); | 289 return MakeOutputStream(params); |
| 290 } | 290 } |
| 291 | 291 |
| 292 AudioOutputStream* AudioManagerAlsa::MakeLowLatencyOutputStream( | 292 AudioOutputStream* AudioManagerAlsa::MakeLowLatencyOutputStream( |
| 293 const AudioParameters& params, | 293 const AudioParameters& params, |
| 294 const std::string& device_id) { | 294 const std::string& device_id, |
| 295 const StatisticsCallback& statistics_callback) { |
| 295 DLOG_IF(ERROR, !device_id.empty()) << "Not implemented!"; | 296 DLOG_IF(ERROR, !device_id.empty()) << "Not implemented!"; |
| 296 DCHECK_EQ(AudioParameters::AUDIO_PCM_LOW_LATENCY, params.format()); | 297 DCHECK_EQ(AudioParameters::AUDIO_PCM_LOW_LATENCY, params.format()); |
| 297 return MakeOutputStream(params); | 298 return MakeOutputStream(params); |
| 298 } | 299 } |
| 299 | 300 |
| 300 AudioInputStream* AudioManagerAlsa::MakeLinearInputStream( | 301 AudioInputStream* AudioManagerAlsa::MakeLinearInputStream( |
| 301 const AudioParameters& params, const std::string& device_id) { | 302 const AudioParameters& params, const std::string& device_id) { |
| 302 DCHECK_EQ(AudioParameters::AUDIO_PCM_LINEAR, params.format()); | 303 DCHECK_EQ(AudioParameters::AUDIO_PCM_LINEAR, params.format()); |
| 303 return MakeInputStream(params, device_id); | 304 return MakeInputStream(params, device_id); |
| 304 } | 305 } |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 359 if (base::CommandLine::ForCurrentProcess()->HasSwitch( | 360 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 360 switches::kAlsaInputDevice)) { | 361 switches::kAlsaInputDevice)) { |
| 361 device_name = base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII( | 362 device_name = base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII( |
| 362 switches::kAlsaInputDevice); | 363 switches::kAlsaInputDevice); |
| 363 } | 364 } |
| 364 | 365 |
| 365 return new AlsaPcmInputStream(this, device_name, params, wrapper_.get()); | 366 return new AlsaPcmInputStream(this, device_name, params, wrapper_.get()); |
| 366 } | 367 } |
| 367 | 368 |
| 368 } // namespace media | 369 } // namespace media |
| OLD | NEW |