[PATCH] dsound: fix 3D positioning bug with head-relative buffers

Mark Harmstone hellas at burntcomma.com
Mon Feb 2 17:55:39 CST 2015


Patch to fix a bug in dsound where head-relative 3D buffers would be positioned
incorrectly. DSOUND_Calc3DBuffer calculated vDistance twice, each time with
different signs. If the listener position was set to something other than the
origin, this would result in head-relative buffers having the wrong position,
as the second time Wine would calculate vDistance as it if they were normal
sources.

I discovered this bug on Baldur's Gate 2 - if you convince it to operate in EAX
mode, it'll set the listener position. As the character voices are all head-
relative, they'll always come out of the left speaker, rather than the centre
as expected.

---
 dlls/dsound/sound3d.c | 19 +++++++++++--------
 1 file changed, 11 insertions(+), 8 deletions(-)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-dsound-fix-3D-positioning-bug-with-head-relative-buf.patch
Type: text/x-patch
Size: 2321 bytes
Desc: not available
URL: <http://www.winehq.org/pipermail/wine-patches/attachments/20150202/fe5dd600/attachment.bin>


More information about the wine-patches mailing list