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

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

Issue 2345813002: Query native channel count in preferred parameters. (Closed)
Patch Set: Created 4 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 | « 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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 65
66 // Callback to get the devices' info like names, used by GetInputDevices(). 66 // Callback to get the devices' info like names, used by GetInputDevices().
67 static void InputDevicesInfoCallback(pa_context* context, 67 static void InputDevicesInfoCallback(pa_context* context,
68 const pa_source_info* info, 68 const pa_source_info* info,
69 int error, void* user_data); 69 int error, void* user_data);
70 static void OutputDevicesInfoCallback(pa_context* context, 70 static void OutputDevicesInfoCallback(pa_context* context,
71 const pa_sink_info* info, 71 const pa_sink_info* info,
72 int error, void* user_data); 72 int error, void* user_data);
73 73
74 // Callback to get the native sample rate of PulseAudio, used by 74 // Callback to get the native sample rate of PulseAudio, used by
75 // GetNativeSampleRate(). 75 // GetNativeSampleRate().
watk 2016/09/15 21:21:52 comment is out of date
DaleCurtis 2016/09/15 21:35:49 Fixed.
76 static void SampleRateInfoCallback(pa_context* context, 76 static void AudioHardwareInfoCallback(pa_context* context,
77 const pa_server_info* info, 77 const pa_server_info* info,
78 void* user_data); 78 void* user_data);
79 79
80 // Called by MakeLinearOutputStream and MakeLowLatencyOutputStream. 80 // Called by MakeLinearOutputStream and MakeLowLatencyOutputStream.
81 AudioOutputStream* MakeOutputStream(const AudioParameters& params, 81 AudioOutputStream* MakeOutputStream(const AudioParameters& params,
82 const std::string& device_id); 82 const std::string& device_id);
83 83
84 // Called by MakeLinearInputStream and MakeLowLatencyInputStream. 84 // Called by MakeLinearInputStream and MakeLowLatencyInputStream.
85 AudioInputStream* MakeInputStream(const AudioParameters& params, 85 AudioInputStream* MakeInputStream(const AudioParameters& params,
86 const std::string& device_id); 86 const std::string& device_id);
87 87
88 // Gets the native sample rate of Pulse. 88 // Updates |native_input_sample_rate_| and |native_channel_count_|.
89 int GetNativeSampleRate(); 89 void UpdateNativeAudioHardwareInfo();
90 90
91 pa_threaded_mainloop* input_mainloop_; 91 pa_threaded_mainloop* input_mainloop_;
92 pa_context* input_context_; 92 pa_context* input_context_;
93 AudioDeviceNames* devices_; 93 AudioDeviceNames* devices_;
94 int native_input_sample_rate_; 94 int native_input_sample_rate_;
95 int native_channel_count_;
95 96
96 DISALLOW_COPY_AND_ASSIGN(AudioManagerPulse); 97 DISALLOW_COPY_AND_ASSIGN(AudioManagerPulse);
97 }; 98 };
98 99
99 } // namespace media 100 } // namespace media
100 101
101 #endif // MEDIA_AUDIO_PULSE_AUDIO_MANAGER_PULSE_H_ 102 #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