dsound: Fix angle to sound source calculation.

Mark Harmstone hellas at burntcomma.com
Sun Mar 29 12:22:33 CDT 2015

On 26/03/15 15:26, Andrew Eikum wrote:
> 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?
> Andrew

That's entirely possible - I can't remember if I touched the coning code
when I put in the surround sound support. Do you know if there's any
testcase we could use for coning support?


More information about the wine-devel mailing list