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

Side by Side Diff: media/audio/linux/audio_manager_linux.cc

Issue 23475037: Implement GetAudioOutputDevices for remaining platforms, consolidate tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkgr
Patch Set: Merge LKGR, remove anonymous namespaces. 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 unified diff | Download patch
« no previous file with comments | « media/audio/linux/audio_manager_linux.h ('k') | media/audio/mac/audio_manager_mac.h » ('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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/linux/audio_manager_linux.h" 5 #include "media/audio/linux/audio_manager_linux.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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 96
97 AudioManagerLinux::~AudioManagerLinux() { 97 AudioManagerLinux::~AudioManagerLinux() {
98 Shutdown(); 98 Shutdown();
99 } 99 }
100 100
101 void AudioManagerLinux::ShowAudioInputSettings() { 101 void AudioManagerLinux::ShowAudioInputSettings() {
102 ShowLinuxAudioInputSettings(); 102 ShowLinuxAudioInputSettings();
103 } 103 }
104 104
105 void AudioManagerLinux::GetAudioInputDeviceNames( 105 void AudioManagerLinux::GetAudioInputDeviceNames(
106 media::AudioDeviceNames* device_names) { 106 AudioDeviceNames* device_names) {
107 DCHECK(device_names->empty()); 107 DCHECK(device_names->empty());
108 GetAlsaAudioDevices(kStreamCapture, device_names); 108 GetAlsaAudioDevices(kStreamCapture, device_names);
109 } 109 }
110 110
111 void AudioManagerLinux::GetAudioOutputDeviceNames( 111 void AudioManagerLinux::GetAudioOutputDeviceNames(
112 media::AudioDeviceNames* device_names) { 112 AudioDeviceNames* device_names) {
113 DCHECK(device_names->empty()); 113 DCHECK(device_names->empty());
114 GetAlsaAudioDevices(kStreamPlayback, device_names); 114 GetAlsaAudioDevices(kStreamPlayback, device_names);
115 } 115 }
116 116
117 AudioParameters AudioManagerLinux::GetInputStreamParameters( 117 AudioParameters AudioManagerLinux::GetInputStreamParameters(
118 const std::string& device_id) { 118 const std::string& device_id) {
119 static const int kDefaultInputBufferSize = 1024; 119 static const int kDefaultInputBufferSize = 1024;
120 120
121 return AudioParameters( 121 return AudioParameters(
122 AudioParameters::AUDIO_PCM_LOW_LATENCY, CHANNEL_LAYOUT_STEREO, 122 AudioParameters::AUDIO_PCM_LOW_LATENCY, CHANNEL_LAYOUT_STEREO,
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
380 UMA_HISTOGRAM_ENUMERATION("Media.LinuxAudioIO", kPulse, kAudioIOMax); 380 UMA_HISTOGRAM_ENUMERATION("Media.LinuxAudioIO", kPulse, kAudioIOMax);
381 return manager; 381 return manager;
382 } 382 }
383 #endif 383 #endif
384 384
385 UMA_HISTOGRAM_ENUMERATION("Media.LinuxAudioIO", kAlsa, kAudioIOMax); 385 UMA_HISTOGRAM_ENUMERATION("Media.LinuxAudioIO", kAlsa, kAudioIOMax);
386 return new AudioManagerLinux(); 386 return new AudioManagerLinux();
387 } 387 }
388 388
389 } // namespace media 389 } // namespace media
OLDNEW
« no previous file with comments | « media/audio/linux/audio_manager_linux.h ('k') | media/audio/mac/audio_manager_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698