DSOUND_PrimarySetFormat overwrites format on failure

Torbjörn Söderstedt torbjrn at users.sourceforge.net
Sun Sep 21 15:06:12 CDT 2008


DSOUND_PrimarySetFormat will copy the new format before checking if it is supported. If changing format fails 
without causing DSERR_BUFFERLOST, the buffer will have incorrect settings. I created a temporary buffer that is used 
by the affected code.

The Typing of the Dead tries to set a format with nBlockAlign=0 (wBitsPerSample=2), leading to a division by zero in 
DSOUND_MixInBuffer. Bug 2361 might be related, but I can't reproduce.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Do-not-overwrite-format-until-format-has-changed-in.patch
Type: text/x-diff
Size: 0 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20080921/9b6b1fb3/attachment.patch 


More information about the wine-patches mailing list