mmio: Do not zero current file position whenever mmioSetBuffer is called

Matthew D'Asaro medasaro at u.washington.edu
Tue Jun 3 21:57:00 CDT 2008


This patch fixes bug 13669 - DCArt32: a bug in mmio breaks audio 
filters. Please review what I have done here and tell me if I am wrong. 
I am still new to coding for wine :-)

As mmioSetBuffer is currently written, every time it is called it sets 
wm->info.lBufOffset to zero. This is incorrect as setting this to zero 
effectively sets the current file position pointer to zero which means 
that subsequent mmioWrite operations will overwrite existing data. 
Instead I set wm->info.lBufOffset to wm->info.lDiskOffset because the 
buffer is flushed at the beginning of a call to mmioSetBuffer so 
wm->info.lDiskOffset is synchronized with wm->info.lBufOffset and so 
wm->info.lDiskOffset contains the correct current file position. The 
test for mmio still passes with this patch.

-Matthew D'Asaro
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 0001-mmio-Do-not-zero-the-current-file-position-when-ever-mmioSetBuffer-is.txt
Url: http://www.winehq.org/pipermail/wine-patches/attachments/20080603/b2e2ed56/attachment.txt 


More information about the wine-patches mailing list