summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorglx <glx@openttd.org>2008-04-14 20:14:32 +0000
committerglx <glx@openttd.org>2008-04-14 20:14:32 +0000
commitf63bd286e0b60f7a0e7553d2fd2f2343f76754ce (patch)
treef30216e61b99dd22c2ee2ba82fdc36d5215a779e
parent253a95777c69c3d114fc96ab8e3ae47d9bb6988f (diff)
downloadopenttd-f63bd286e0b60f7a0e7553d2fd2f2343f76754ce.tar.xz
(svn r12708) -Fix (FS#1914): increase default sound buffer size only for vista
-rw-r--r--src/sound/win32_s.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/sound/win32_s.cpp b/src/sound/win32_s.cpp
index 2cc45d689..386c6f4a5 100644
--- a/src/sound/win32_s.cpp
+++ b/src/sound/win32_s.cpp
@@ -59,7 +59,7 @@ const char *SoundDriver_Win32::Start(const char* const* parm)
wfex.nBlockAlign = (wfex.nChannels * wfex.wBitsPerSample) / 8;
wfex.nAvgBytesPerSec = wfex.nSamplesPerSec * wfex.nBlockAlign;
- _bufsize = GetDriverParamInt(parm, "bufsize", 2048);
+ _bufsize = GetDriverParamInt(parm, "bufsize", (GB(GetVersion(), 0, 8) > 5) ? 2048 : 1024);
if (waveOutOpen(&_waveout, WAVE_MAPPER, &wfex, (DWORD_PTR)&waveOutProc, 0, CALLBACK_FUNCTION) != MMSYSERR_NOERROR)
return "waveOutOpen failed";