Use 3 wave out buffers for all XP configurations (not just single-processor).

Some configurations almost certainly need 3 (at least for Pepper audio).

BUG=136624

Review URL: https://chromiumcodereview.appspot.com/10837115

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@150011 0039d316-1c4b-4281-b951-d872f2087c98
parent e99ea82f
...@@ -28,7 +28,6 @@ ...@@ -28,7 +28,6 @@
#include "media/audio/mac/audio_low_latency_output_mac.h" #include "media/audio/mac/audio_low_latency_output_mac.h"
#elif defined(OS_WIN) #elif defined(OS_WIN)
#include "base/command_line.h" #include "base/command_line.h"
#include "base/sys_info.h"
#include "base/win/windows_version.h" #include "base/win/windows_version.h"
#include "media/audio/audio_manager_base.h" #include "media/audio/audio_manager_base.h"
#include "media/audio/win/audio_low_latency_input_win.h" #include "media/audio/win/audio_low_latency_input_win.h"
...@@ -542,20 +541,13 @@ bool IsWASAPISupported() { ...@@ -542,20 +541,13 @@ bool IsWASAPISupported() {
} }
int NumberOfWaveOutBuffers() { int NumberOfWaveOutBuffers() {
// The entire Windows audio stack was rewritten for Windows Vista, and the // Use 4 buffers for Vista, 3 for everyone else:
// wave out API is simulated on top of new API, so there is noticeable // - The entire Windows audio stack was rewritten for Windows Vista and wave
// performance degradation compared to Windows XP. So use 4 buffers for Vista. // out performance was degraded compared to XP.
if (base::win::GetVersion() == base::win::VERSION_VISTA) // - The regression was fixed in Windows 7 and most configurations will work
return 4; // with 2, but some (e.g., some Sound Blasters) still need 3.
// - Some XP configurations (even multi-processor ones) also need 3.
// Part of regression was apparently fixed in Windows 7, but problems remain return (base::win::GetVersion() == base::win::VERSION_VISTA) ? 4 : 3;
// 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;
} }
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment