Maarten Lankhorst : winealsa.drv: Ignore unused bytes in wave headers.

Alexandre Julliard julliard at winehq.org
Mon Apr 12 09:54:06 CDT 2010


Module: wine
Branch: master
Commit: 8f6d268ee42a9726fcffb01568791df73adcd867
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=8f6d268ee42a9726fcffb01568791df73adcd867

Author: Maarten Lankhorst <m.b.lankhorst at gmail.com>
Date:   Thu Apr  8 21:54:50 2010 +0200

winealsa.drv: Ignore unused bytes in wave headers.

---

 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 */




More information about the wine-cvs mailing list