dsound: Fix angle to sound source calculation.

Andrew Eikum aeikum at codeweavers.com
Thu Mar 26 10:26:54 CDT 2015

On Tue, Mar 24, 2015 at 09:13:43PM +0300, Стас Цымбалов wrote:
> > Any thoughts on the coning breakage, Stas?
> To me it seems that coning should work the same as before commit
> 02f9edfd77302eabc0a8a6e45a9423ebe2b1acef (which introduced panning
> between multiple speakers). In that commit AngleBetweenVectorsRad was
> changed in the way that it is now and there was no comment about how
> it would affect coning code. So there are 2 possibilities:
>   1. Coning was broken before
> 02f9edfd77302eabc0a8a6e45a9423ebe2b1acef, got silently fixed by that
> commit, and will be broken again after my patch.
>   2. Coning was fine before 02f9edfd77302eabc0a8a6e45a9423ebe2b1acef,
> and will be the same after my patch.
> Which of these is true I don't know, I would appreciate if anybody
> could point out to me how could I test it.

Mark, any thoughts? We could remove the logic from
AngleBetweenVectorsRad and add it back just to the coning handling in
DSOUND_Calc3DBuffer if you think it's correct.

I've tried working through the logic, but I can't figure out why we
want to subtract 180 degrees when the cosine is negative. It seems to
me that Stas's change to AngleBetweenVectorsRad is correct. Am I
missing something?


More information about the wine-devel mailing list