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

Unified Diff: media/audio/cras/audio_manager_cras.cc

Issue 23723009: Implement GetAudioOutputDeviceNames for Cras. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkgr
Patch Set: Remove empty impl. Created 7 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/audio/cras/audio_manager_cras.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/cras/audio_manager_cras.cc
diff --git a/media/audio/cras/audio_manager_cras.cc b/media/audio/cras/audio_manager_cras.cc
index 276487557e0d606fff86f4543d347c597af89ad7..2e524ffeaae8d2d1b5ea44c8bfbc057ea93dbcbb 100644
--- a/media/audio/cras/audio_manager_cras.cc
+++ b/media/audio/cras/audio_manager_cras.cc
@@ -16,6 +16,19 @@
namespace media {
+namespace {
tfarina 2013/09/15 03:17:45 minor-question: hasn't media folks decided to use
Jói 2013/09/16 08:56:45 Not that I know of. Tommi?
tommi (sloooow) - chröme 2013/09/16 10:47:41 Yes, that's correct.
+
+void AddDefaultDevice(media::AudioDeviceNames* device_names) {
tfarina 2013/09/15 03:17:45 micro-style-nit: no media:: here.
Jói 2013/09/16 08:56:45 Addressed, although not here (this patch is closed
+ DCHECK(device_names->empty());
+
+ // Cras will route audio from a proper physical device automatically.
+ device_names->push_back(
+ AudioDeviceName(AudioManagerBase::kDefaultDeviceName,
+ AudioManagerBase::kDefaultDeviceId));
+}
+
+} // namespace
+
// Maximum number of output streams that can be open simultaneously.
static const int kMaxOutputStreams = 50;
@@ -46,9 +59,12 @@ void AudioManagerCras::ShowAudioInputSettings() {
void AudioManagerCras::GetAudioInputDeviceNames(
media::AudioDeviceNames* device_names) {
- DCHECK(device_names->empty());
- GetCrasAudioInputDevices(device_names);
- return;
+ AddDefaultDevice(device_names);
+}
+
+void AudioManagerCras::GetAudioOutputDeviceNames(
+ media::AudioDeviceNames* device_names) {
+ AddDefaultDevice(device_names);
}
AudioParameters AudioManagerCras::GetInputStreamParameters(
@@ -61,14 +77,6 @@ AudioParameters AudioManagerCras::GetInputStreamParameters(
kDefaultSampleRate, 16, kDefaultInputBufferSize);
}
-void AudioManagerCras::GetCrasAudioInputDevices(
- media::AudioDeviceNames* device_names) {
- // Cras will route audio from a proper physical device automatically.
- device_names->push_back(
- AudioDeviceName(AudioManagerBase::kDefaultDeviceName,
- AudioManagerBase::kDefaultDeviceId));
-}
-
AudioOutputStream* AudioManagerCras::MakeLinearOutputStream(
const AudioParameters& params) {
DCHECK_EQ(AudioParameters::AUDIO_PCM_LINEAR, params.format());
« no previous file with comments | « media/audio/cras/audio_manager_cras.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698