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

Unified Diff: ppapi/shared_impl/ppb_audio_config_shared.cc

Issue 23672035: Classify ARM Chromebooks as high latency audio. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 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: ppapi/shared_impl/ppb_audio_config_shared.cc
===================================================================
--- ppapi/shared_impl/ppb_audio_config_shared.cc (revision 221928)
+++ ppapi/shared_impl/ppb_audio_config_shared.cc (working copy)
@@ -81,6 +81,17 @@
// care when modifying these values as they impact a large number of users.
// TODO(dalecurtis): Land jitter test and add documentation for updating this.
+ // Should track the value reported by XP and ALSA backends.
+ const uint32_t kHighLatencySampleFrameCount = 2048;
+
+#if defined(OS_CHROMEOS) && defined(ARCH_CPU_ARM_FAMILY)
DaleCurtis 2013/09/12 18:12:53 might need #include build/build_config.h
ilja 2013/09/13 20:22:44 Done.
+ // TODO(ihf): Remove this once ARM Chromebooks support low latency audio. For
+ // now we classify them as high latency. See crbug.com/289770.
+ return CalculateMultipleOfSampleFrameCount(
+ sample_frame_count,
+ kHighLatencySampleFrameCount);
+#endif // defined(OS_CHROMEOS) && defined(ARCH_CPU_ARM_FAMILY)
+
// If client is using same sample rate as audio hardware, then recommend a
// multiple of the audio hardware's sample frame count.
if (hardware_sample_rate == sample_rate) {
@@ -88,9 +99,6 @@
hardware_sample_frame_count, sample_frame_count);
}
- // Should track the value reported by XP and ALSA backends.
- const uint32_t kHighLatencySampleFrameCount = 2048;
-
// If the hardware requires a high latency buffer or we're at a low sample
// rate w/ a buffer that's larger than 10ms, choose the nearest multiple of
// the high latency sample frame count. An example of too low and too large
« 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