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

Unified Diff: src/content/renderer/pepper/pepper_platform_audio_output_impl.cc

Issue 10824135: On 1180 (M21): Always use non-low-latency (wave out) audio for Pepper plugins on Windows. (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1180/
Patch Set: Created 8 years, 5 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: src/content/renderer/pepper/pepper_platform_audio_output_impl.cc
===================================================================
--- src/content/renderer/pepper/pepper_platform_audio_output_impl.cc (revision 149496)
+++ src/content/renderer/pepper/pepper_platform_audio_output_impl.cc (working copy)
@@ -113,6 +113,14 @@
client_ = client;
media::AudioParameters::Format format;
+#if defined(OS_WIN)
+ // For Chrome 21 on Windows, avoid the low-latency (WASAPI) path for the sake
+ // of Pepper Flash. Currently, the WASAPI path will fail silently for, e.g.,
+ // 5.1/7.1 sound. (Flash always requests 44.1 kHz anyways, so it's already
+ // using the non-low-latency (wave-out) path on any system that's configured
+ // for 48 kHz.)
+ format = media::AudioParameters::AUDIO_PCM_LINEAR;
+#else
const int kMaxFramesForLowLatency = 2048;
// Use the low latency back end if the client request is compatible, and
// the sample count is low enough to justify using AUDIO_PCM_LOW_LATENCY.
@@ -123,6 +131,7 @@
} else {
format = media::AudioParameters::AUDIO_PCM_LINEAR;
}
+#endif
media::AudioParameters params(format, CHANNEL_LAYOUT_STEREO, sample_rate, 16,
frames_per_buffer);
« 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