OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |