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

Unified Diff: media/audio/audio_util.cc

Issue 12224016: Add --waveout-buffers switch for Windows users. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 years, 10 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/base/media_switches.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/audio_util.cc
diff --git a/media/audio/audio_util.cc b/media/audio/audio_util.cc
index e67dd8e8246286c642908b144ed1c97deea09efc..8df373940716a76f57c506e9c06d81c25e8ac453 100644
--- a/media/audio/audio_util.cc
+++ b/media/audio/audio_util.cc
@@ -339,6 +339,14 @@ size_t GetHighLatencyOutputBufferSize(int sample_rate) {
#if defined(OS_WIN)
int NumberOfWaveOutBuffers() {
+ // Use the user provided buffer count if provided.
+ int buffers = 0;
+ std::string buffers_str(CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
+ switches::kWaveOutBuffers));
+ if (base::StringToInt(buffers_str, &buffers) && buffers > 0) {
+ return buffers;
+ }
+
// Use 4 buffers for Vista, 3 for everyone else:
// - The entire Windows audio stack was rewritten for Windows Vista and wave
// out performance was degraded compared to XP.
« no previous file with comments | « no previous file | media/base/media_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698