Re: stereo panning change in 1.15
Chris Robinson <[email protected]> Sun, 14 Jul 2013 11:40:26 -0700
| Newsgroups | gmane.comp.lib.openal |
|---|---|
| Message-ID | <[email protected]> |
On 07/13/2013 11:24 AM, Alan Witkowski wrote: > My question is: was this drastic change intentional? Is there an easy way > replicate the old behavior without doing the calculations manually? It was intentional, yes. The problem is that you'll not have that behavior with any other implementation, and you won't have it with OpenAL Soft if HRTF is enabled. Since it was the original expected behavior to not pan like that, and you're not guaranteed to be able to depending on the output mode, to me it seems best to be consistent. You can replicate the old behavior by moving the source in an arc above the listener. For instance: alSourcef(mSource, AL_REFERENCE_DISTANCE, 1.0f); alSourcei(mSource, AL_SOURCE_RELATIVE, AL_TRUE); ALfloat pan[3]; pan[0] = x_pan; // from -1 (left) to +1 (right) pan[1] = sqrt(1.0f - x_pan*x_pan); pan[2] = 0.0f; alSourcefv(mSource, AL_POSITION, pan); This will be compatible with HRTF and other implementations. _______________________________________________ Openal mailing list [email protected] http://opensource.creative.com/mailman/listinfo/openal