DSOUND_PrimarySetFormat overwrites format on failure
torso at opera.com
Tue Oct 7 07:18:00 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 data structure 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.
More information about the wine-patches