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

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

Issue 16348003: Merge 202233 "Allow sample rate pass through on Linux." (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1500/src/
Patch Set: Created 7 years, 6 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 | « content/renderer/media/audio_renderer_mixer_manager.cc ('k') | media/audio/pulse/pulse_util.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.cc
===================================================================
--- media/audio/pulse/audio_manager_pulse.cc (revision 204027)
+++ media/audio/pulse/audio_manager_pulse.cc (working copy)
@@ -141,11 +141,15 @@
int buffer_size = kDefaultOutputBufferSize;
int bits_per_sample = 16;
int input_channels = 0;
+ int sample_rate;
if (input_params.IsValid()) {
bits_per_sample = input_params.bits_per_sample();
channel_layout = input_params.channel_layout();
input_channels = input_params.input_channels();
buffer_size = std::min(buffer_size, input_params.frames_per_buffer());
+ sample_rate = input_params.sample_rate();
+ } else {
+ sample_rate = GetNativeSampleRate();
}
int user_buffer_size = GetUserBufferSize();
@@ -154,7 +158,7 @@
return AudioParameters(
AudioParameters::AUDIO_PCM_LOW_LATENCY, channel_layout, input_channels,
- GetNativeSampleRate(), bits_per_sample, buffer_size);
+ sample_rate, bits_per_sample, buffer_size);
}
AudioOutputStream* AudioManagerPulse::MakeOutputStream(
« no previous file with comments | « content/renderer/media/audio_renderer_mixer_manager.cc ('k') | media/audio/pulse/pulse_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698