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

Side by Side Diff: media/audio/cras/audio_manager_cras.cc

Issue 15979015: Reland 15721002: Hook up the device selection to the WebAudio live audio (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixed the comments. Created 7 years, 6 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 | Annotate | Revision Log
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/cras/audio_manager_cras.h" 5 #include "media/audio/cras/audio_manager_cras.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/logging.h" 9 #include "base/logging.h"
10 #include "base/nix/xdg_util.h" 10 #include "base/nix/xdg_util.h"
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 AudioManagerBase::kDefaultDeviceId)); 67 AudioManagerBase::kDefaultDeviceId));
68 } 68 }
69 69
70 AudioOutputStream* AudioManagerCras::MakeLinearOutputStream( 70 AudioOutputStream* AudioManagerCras::MakeLinearOutputStream(
71 const AudioParameters& params) { 71 const AudioParameters& params) {
72 DCHECK_EQ(AudioParameters::AUDIO_PCM_LINEAR, params.format()); 72 DCHECK_EQ(AudioParameters::AUDIO_PCM_LINEAR, params.format());
73 return MakeOutputStream(params); 73 return MakeOutputStream(params);
74 } 74 }
75 75
76 AudioOutputStream* AudioManagerCras::MakeLowLatencyOutputStream( 76 AudioOutputStream* AudioManagerCras::MakeLowLatencyOutputStream(
77 const AudioParameters& params) { 77 const AudioParameters& params, const std::string& input_device_id) {
78 DCHECK_EQ(AudioParameters::AUDIO_PCM_LOW_LATENCY, params.format()); 78 DCHECK_EQ(AudioParameters::AUDIO_PCM_LOW_LATENCY, params.format());
79 // TODO(dgreid): Open the correct input device for unified IO.
79 return MakeOutputStream(params); 80 return MakeOutputStream(params);
80 } 81 }
81 82
82 AudioInputStream* AudioManagerCras::MakeLinearInputStream( 83 AudioInputStream* AudioManagerCras::MakeLinearInputStream(
83 const AudioParameters& params, const std::string& device_id) { 84 const AudioParameters& params, const std::string& device_id) {
84 DCHECK_EQ(AudioParameters::AUDIO_PCM_LINEAR, params.format()); 85 DCHECK_EQ(AudioParameters::AUDIO_PCM_LINEAR, params.format());
85 return MakeInputStream(params, device_id); 86 return MakeInputStream(params, device_id);
86 } 87 }
87 88
88 AudioInputStream* AudioManagerCras::MakeLowLatencyInputStream( 89 AudioInputStream* AudioManagerCras::MakeLowLatencyInputStream(
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 const AudioParameters& params) { 122 const AudioParameters& params) {
122 return new CrasUnifiedStream(params, this); 123 return new CrasUnifiedStream(params, this);
123 } 124 }
124 125
125 AudioInputStream* AudioManagerCras::MakeInputStream( 126 AudioInputStream* AudioManagerCras::MakeInputStream(
126 const AudioParameters& params, const std::string& device_id) { 127 const AudioParameters& params, const std::string& device_id) {
127 return new CrasInputStream(params, this); 128 return new CrasInputStream(params, this);
128 } 129 }
129 130
130 } // namespace media 131 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698