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

Unified Diff: media/audio/pulse/audio_manager_pulse.h

Issue 2345813002: Query native channel count in preferred parameters. (Closed)
Patch Set: Fix comment. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | media/audio/pulse/audio_manager_pulse.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/pulse/audio_manager_pulse.h
diff --git a/media/audio/pulse/audio_manager_pulse.h b/media/audio/pulse/audio_manager_pulse.h
index b679278510ac4e628da35a72082a3ae39caa7eaa..bd660914f1c5a32db87123872ac4d0762d4eda1e 100644
--- a/media/audio/pulse/audio_manager_pulse.h
+++ b/media/audio/pulse/audio_manager_pulse.h
@@ -72,10 +72,10 @@ class MEDIA_EXPORT AudioManagerPulse : public AudioManagerBase {
int error, void* user_data);
// Callback to get the native sample rate of PulseAudio, used by
- // GetNativeSampleRate().
- static void SampleRateInfoCallback(pa_context* context,
- const pa_server_info* info,
- void* user_data);
+ // UpdateNativeAudioHardwareInfo().
+ static void AudioHardwareInfoCallback(pa_context* context,
+ const pa_server_info* info,
+ void* user_data);
// Called by MakeLinearOutputStream and MakeLowLatencyOutputStream.
AudioOutputStream* MakeOutputStream(const AudioParameters& params,
@@ -85,13 +85,14 @@ class MEDIA_EXPORT AudioManagerPulse : public AudioManagerBase {
AudioInputStream* MakeInputStream(const AudioParameters& params,
const std::string& device_id);
- // Gets the native sample rate of Pulse.
- int GetNativeSampleRate();
+ // Updates |native_input_sample_rate_| and |native_channel_count_|.
+ void UpdateNativeAudioHardwareInfo();
pa_threaded_mainloop* input_mainloop_;
pa_context* input_context_;
AudioDeviceNames* devices_;
int native_input_sample_rate_;
+ int native_channel_count_;
DISALLOW_COPY_AND_ASSIGN(AudioManagerPulse);
};
« 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