OLD | NEW |
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/pulse/audio_manager_pulse.h" | 5 #include "media/audio/pulse/audio_manager_pulse.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 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 input_context_, InputDevicesInfoCallback, this); | 106 input_context_, InputDevicesInfoCallback, this); |
107 } else { | 107 } else { |
108 operation = pa_context_get_sink_info_list( | 108 operation = pa_context_get_sink_info_list( |
109 input_context_, OutputDevicesInfoCallback, this); | 109 input_context_, OutputDevicesInfoCallback, this); |
110 } | 110 } |
111 WaitForOperationCompletion(input_mainloop_, operation); | 111 WaitForOperationCompletion(input_mainloop_, operation); |
112 | 112 |
113 // Prepend the default device if the list is not empty. | 113 // Prepend the default device if the list is not empty. |
114 if (!device_names->empty()) { | 114 if (!device_names->empty()) { |
115 device_names->push_front( | 115 device_names->push_front( |
116 AudioDeviceName(AudioManagerBase::kDefaultDeviceName, | 116 AudioDeviceName(AudioManager::GetDefaultDeviceName(), |
117 AudioManagerBase::kDefaultDeviceId)); | 117 AudioManagerBase::kDefaultDeviceId)); |
118 } | 118 } |
119 } | 119 } |
120 | 120 |
121 void AudioManagerPulse::GetAudioInputDeviceNames( | 121 void AudioManagerPulse::GetAudioInputDeviceNames( |
122 AudioDeviceNames* device_names) { | 122 AudioDeviceNames* device_names) { |
123 GetAudioDeviceNames(true, device_names); | 123 GetAudioDeviceNames(true, device_names); |
124 } | 124 } |
125 | 125 |
126 void AudioManagerPulse::GetAudioOutputDeviceNames( | 126 void AudioManagerPulse::GetAudioOutputDeviceNames( |
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
332 void AudioManagerPulse::SampleRateInfoCallback(pa_context* context, | 332 void AudioManagerPulse::SampleRateInfoCallback(pa_context* context, |
333 const pa_server_info* info, | 333 const pa_server_info* info, |
334 void* user_data) { | 334 void* user_data) { |
335 AudioManagerPulse* manager = reinterpret_cast<AudioManagerPulse*>(user_data); | 335 AudioManagerPulse* manager = reinterpret_cast<AudioManagerPulse*>(user_data); |
336 | 336 |
337 manager->native_input_sample_rate_ = info->sample_spec.rate; | 337 manager->native_input_sample_rate_ = info->sample_spec.rate; |
338 pa_threaded_mainloop_signal(manager->input_mainloop_, 0); | 338 pa_threaded_mainloop_signal(manager->input_mainloop_, 0); |
339 } | 339 } |
340 | 340 |
341 } // namespace media | 341 } // namespace media |
OLD | NEW |