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

Unified Diff: media/audio/audio_util.cc

Issue 10837115: Use 3 wave out buffers for all XP configurations (not just single-processor). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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/audio_util.cc
diff --git a/media/audio/audio_util.cc b/media/audio/audio_util.cc
index 83b927d69c59d8ae7a0d8c7256d8132cea537735..a8ce2b53b1b2ade6aee0d4c602c23b129c53bca2 100644
--- a/media/audio/audio_util.cc
+++ b/media/audio/audio_util.cc
@@ -28,7 +28,6 @@
#include "media/audio/mac/audio_low_latency_output_mac.h"
#elif defined(OS_WIN)
#include "base/command_line.h"
-#include "base/sys_info.h"
#include "base/win/windows_version.h"
#include "media/audio/audio_manager_base.h"
#include "media/audio/win/audio_low_latency_input_win.h"
@@ -542,20 +541,13 @@ bool IsWASAPISupported() {
}
int NumberOfWaveOutBuffers() {
- // The entire Windows audio stack was rewritten for Windows Vista, and the
- // wave out API is simulated on top of new API, so there is noticeable
- // performance degradation compared to Windows XP. So use 4 buffers for Vista.
- if (base::win::GetVersion() == base::win::VERSION_VISTA)
- return 4;
-
- // Part of regression was apparently fixed in Windows 7, but problems remain
- // at least with some configurations (compared to XP). So use 3 buffers for
- // Windows 7 and higher.
- if (base::win::GetVersion() >= base::win::VERSION_WIN7)
- return 3;
-
- // Otherwise (for XP), use 3 buffers on single-core systems and 2 otherwise.
- return (base::SysInfo::NumberOfProcessors() < 2) ? 3 : 2;
+ // 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.
+ // - The regression was fixed in Windows 7 and most configurations will work
+ // with 2, but some (e.g., some Sound Blasters) still need 3.
+ // - Some XP configurations (even multi-processor ones) also need 3.
+ return (base::win::GetVersion() == base::win::VERSION_VISTA) ? 4 : 3;
}
#endif
« 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