Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1170)

Side by Side Diff: media/audio/alsa/audio_manager_alsa.cc

Issue 163343002: Reland 153623004: Remove the unified IO code on the browser (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: fixed the cras bot Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « media/audio/alsa/audio_manager_alsa.h ('k') | media/audio/android/audio_android_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « media/audio/alsa/audio_manager_alsa.h ('k') | media/audio/android/audio_android_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698