From c654dedb28b9f3f15eda261545daa333534a7177 Mon Sep 17 00:00:00 2001 From: peter1138 Date: Fri, 10 Jul 2009 18:22:04 +0000 Subject: (svn r16784) -Fix: Audio playback rate was fixed at 11025Hz regardless of the rate specified to the audio driver, resulting in incorrect playback speed. It is still preferable to use 11025Hz output rate if possible as OpenTTD's sample rate converter is very low quality. --- src/sound/win32_s.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/sound/win32_s.cpp') diff --git a/src/sound/win32_s.cpp b/src/sound/win32_s.cpp index 3a5419495..776158adf 100644 --- a/src/sound/win32_s.cpp +++ b/src/sound/win32_s.cpp @@ -65,6 +65,8 @@ const char *SoundDriver_Win32::Start(const char * const *parm) if (waveOutOpen(&_waveout, WAVE_MAPPER, &wfex, (DWORD_PTR)&waveOutProc, 0, CALLBACK_FUNCTION) != MMSYSERR_NOERROR) return "waveOutOpen failed"; + MxInitialize(wfex.nSamplesPerSec); + PrepareHeader(&_wave_hdr[0]); PrepareHeader(&_wave_hdr[1]); FillHeaders(); -- cgit v1.2.3-54-g00ecf