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

Side by Side Diff: media/audio/pulse/audio_manager_pulse.cc

Issue 1362093002: Re-land: Add localized default audio device names. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Exclude media_resource_provider on iOS. Created 5 years, 2 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/mac/audio_manager_mac.cc ('k') | media/audio/win/audio_manager_win.cc » ('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 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
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
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
OLDNEW
« no previous file with comments | « media/audio/mac/audio_manager_mac.cc ('k') | media/audio/win/audio_manager_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698