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

Unified Diff: media/audio/linux/audio_manager_linux.cc

Issue 10991019: audio_manager_linux: Allow CRAS to decide if sample rate conversion is needed. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/linux/audio_manager_linux.cc
diff --git a/media/audio/linux/audio_manager_linux.cc b/media/audio/linux/audio_manager_linux.cc
index b19e9603b602f2f26dfbc6669d98b865f1692685..db37fd5b925a79647d5e7a79026ededdb25e8fa2 100644
--- a/media/audio/linux/audio_manager_linux.cc
+++ b/media/audio/linux/audio_manager_linux.cc
@@ -358,6 +358,14 @@ AudioParameters AudioManagerLinux::GetPreferredLowLatencyOutputStreamParameters(
buffer_size = GetAudioHardwareBufferSize();
}
+#if defined(USE_CRAS)
+ // CRAS will sample rate convert if it is needed, pass the desired frame rate.
DaleCurtis 2012/09/25 19:56:55 To keep style with the above code, why not: int s
+ if (UseCras())
+ return AudioParameters(
+ AudioParameters::AUDIO_PCM_LOW_LATENCY, input_params.channel_layout(),
+ input_params.sample_rate(), 16, buffer_size);
+#endif
+
// TODO(dalecurtis): This should include bits per channel and channel layout
// eventually.
return AudioParameters(
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698