From 4d4cd39da8aa12546af6c7f070ae5d007433f0ed Mon Sep 17 00:00:00 2001 From: =?utf8?q?Alex=20Villac=C3=ADs=20Lasso?= Date: Fri, 12 Aug 2005 11:17:54 +0000 Subject: [PATCH] Remove crackling in DirectSound/ALSA playback with full hardware acceleration. --- dlls/winmm/winealsa/audio.c | 1 + 1 file changed, 1 insertion(+) diff --git a/dlls/winmm/winealsa/audio.c b/dlls/winmm/winealsa/audio.c index 73bac85e65a..bcc1a3ca898 100644 --- a/dlls/winmm/winealsa/audio.c +++ b/dlls/winmm/winealsa/audio.c @@ -3302,6 +3302,7 @@ static HRESULT WINAPI IDsDriverBufferImpl_GetPosition(PIDSDRIVERBUFFER iface, /* FIXME: snd_pcm_mmap_hw_ptr() should not be accessed by a user app. */ /* It will NOT return what why want anyway. */ hw_ptr = _snd_pcm_mmap_hw_ptr(wwo->pcm); + if (hw_ptr >= period_size) hw_ptr -= period_size; else hw_ptr = 0; if (lpdwPlay) *lpdwPlay = snd_pcm_frames_to_bytes(wwo->pcm, hw_ptr/ period_size * period_size) % This->mmap_buflen_bytes; if (lpdwWrite) -- 2.11.4.GIT