DSOUND: reset device playpos/mixpos on buflen change (Was Re: Failing assertion in dsound test, please confirm)

Alex Villací­s Lasso a_villacis at palosanto.com
Mon Jun 25 13:15:08 CDT 2007


Maarten Lankhorst escribió:
> Alex Villací­s Lasso schreef:
>   
>> I am experiencing a failing assertion in a dsound test. Could you
>> please confirm if it is just me (and then it would be a configuration
>> issue), or if anybody else is experiencing failing assertions:
>>     
> Confirmed, I' ll take a closer look at it.
>
> Maarte
I think I found the cause of this failing assertion. When creating the 
sound buffer, or otherwise updating the value of device->buflen, 
device->playpos and device->mixpos should be reset to 0. Otherwise, if 
the new buffer length is shorter than the (leftover) position at 
device->playpos , an assertion fails around line 823 of 
dlls/dsound/mixer.c and it terminates the test (and possibly some 
programs too).

Changelog:
* Reset device playpos/mixpos when updating buflen, to prevent assertion 
from triggering

-- 
perl -e '$x=2.4;print sprintf("%.0f + %.0f = %.0f\n",$x,$x,$x+$x);'

-------------- next part --------------
A non-text attachment was scrubbed...
Name: wine-dsound-primary-reset-playpos-on-buflen-change.patch
Type: text/x-patch
Size: 1646 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20070625/f8edcd84/wine-dsound-primary-reset-playpos-on-buflen-change.bin


More information about the wine-patches mailing list