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

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

Issue 129793012: Implement hook to change audio output device for PulseAudio. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix build error. Created 6 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | media/audio/pulse/audio_manager_pulse.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 #ifndef MEDIA_AUDIO_PULSE_AUDIO_MANAGER_PULSE_H_ 5 #ifndef MEDIA_AUDIO_PULSE_AUDIO_MANAGER_PULSE_H_
6 #define MEDIA_AUDIO_PULSE_AUDIO_MANAGER_PULSE_H_ 6 #define MEDIA_AUDIO_PULSE_AUDIO_MANAGER_PULSE_H_
7 7
8 #include <pulse/pulseaudio.h> 8 #include <pulse/pulseaudio.h>
9 #include <string> 9 #include <string>
10 10
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 const pa_sink_info* info, 62 const pa_sink_info* info,
63 int error, void* user_data); 63 int error, void* user_data);
64 64
65 // Callback to get the native sample rate of PulseAudio, used by 65 // Callback to get the native sample rate of PulseAudio, used by
66 // GetNativeSampleRate(). 66 // GetNativeSampleRate().
67 static void SampleRateInfoCallback(pa_context* context, 67 static void SampleRateInfoCallback(pa_context* context,
68 const pa_server_info* info, 68 const pa_server_info* info,
69 void* user_data); 69 void* user_data);
70 70
71 // Called by MakeLinearOutputStream and MakeLowLatencyOutputStream. 71 // Called by MakeLinearOutputStream and MakeLowLatencyOutputStream.
72 AudioOutputStream* MakeOutputStream(const AudioParameters& params); 72 AudioOutputStream* MakeOutputStream(const AudioParameters& params,
73 const std::string& device_id);
73 74
74 // Called by MakeLinearInputStream and MakeLowLatencyInputStream. 75 // Called by MakeLinearInputStream and MakeLowLatencyInputStream.
75 AudioInputStream* MakeInputStream(const AudioParameters& params, 76 AudioInputStream* MakeInputStream(const AudioParameters& params,
76 const std::string& device_id); 77 const std::string& device_id);
77 78
78 // Gets the native sample rate of Pulse. 79 // Gets the native sample rate of Pulse.
79 int GetNativeSampleRate(); 80 int GetNativeSampleRate();
80 81
81 pa_threaded_mainloop* input_mainloop_; 82 pa_threaded_mainloop* input_mainloop_;
82 pa_context* input_context_; 83 pa_context* input_context_;
83 AudioDeviceNames* devices_; 84 AudioDeviceNames* devices_;
84 int native_input_sample_rate_; 85 int native_input_sample_rate_;
85 86
86 DISALLOW_COPY_AND_ASSIGN(AudioManagerPulse); 87 DISALLOW_COPY_AND_ASSIGN(AudioManagerPulse);
87 }; 88 };
88 89
89 } // namespace media 90 } // namespace media
90 91
91 #endif // MEDIA_AUDIO_PULSE_AUDIO_MANAGER_PULSE_H_ 92 #endif // MEDIA_AUDIO_PULSE_AUDIO_MANAGER_PULSE_H_
OLDNEW
« no previous file with comments | « no previous file | media/audio/pulse/audio_manager_pulse.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698