[PATCH 11/11] winealsa.drv: Ignore unused bytes in wave headers

Maarten Lankhorst m.b.lankhorst at gmail.com
Thu Apr 8 14:54:50 CDT 2010


---
 dlls/winealsa.drv/waveout.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/dlls/winealsa.drv/waveout.c b/dlls/winealsa.drv/waveout.c
index 5c3787b..087f3c3 100644
--- a/dlls/winealsa.drv/waveout.c
+++ b/dlls/winealsa.drv/waveout.c
@@ -256,7 +256,8 @@ static int wodPlayer_WriteMaxFrags(WINE_WAVEDEV* wwo, DWORD* frames)
 	written = 0;
 
     wwo->dwPartialOffset += snd_pcm_frames_to_bytes(wwo->pcm, written);
-    if ( wwo->dwPartialOffset >= lpWaveHdr->dwBufferLength) {
+    if (wwo->dwPartialOffset + wwo->format->Format.nBlockAlign - 1
+        >= lpWaveHdr->dwBufferLength) {
 	/* this will be used to check if the given wave header has been fully played or not... */
 	wwo->dwPartialOffset = lpWaveHdr->dwBufferLength;
 	/* If we wrote all current wavehdr, skip to the next one */
-- 
1.7.0


--------------060801000104030604010906--



More information about the wine-patches mailing list