[DSOUND] primary buffer assert fix
Robert Reif
reif at earthlink.net
Sat Apr 9 15:10:24 CDT 2005
Initialize primary buffer on open.
fixes random dsound->playpos < dsound->buflen asserts
-------------- next part --------------
Index: dlls/dsound/primary.c
===================================================================
RCS file: /home/wine/wine/dlls/dsound/primary.c,v
retrieving revision 1.44
diff -u -p -r1.44 primary.c
--- dlls/dsound/primary.c 15 Mar 2005 15:40:36 -0000 1.44
+++ dlls/dsound/primary.c 9 Apr 2005 19:59:35 -0000
@@ -132,6 +132,9 @@ static HRESULT DSOUND_PrimaryOpen(IDirec
if (This->state == STATE_PLAYING) This->state = STATE_STARTING;
else if (This->state == STATE_STOPPING) This->state = STATE_STOPPED;
+ This->playpos = 0;
+ This->mixpos = 0;
+ FillMemory(This->buffer, This->buflen, (This->pwfx->wBitsPerSample == 8) ? 128 : 0);
}
return err;
More information about the wine-patches
mailing list