[PATCH 2/6] 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 |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/dlls/winealsa.drv/waveout.c b/dlls/winealsa.drv/waveout.c
index 5c3787b..df0027f 100644
--- a/dlls/winealsa.drv/waveout.c
+++ b/dlls/winealsa.drv/waveout.c
@@ -256,7 +256,7 @@ 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


--------------050909000306050701010006--



More information about the wine-patches mailing list