[openal] stereo separation issue with a stereo source

Chris Robinson chris.kcat at gmail.com
Thu Feb 5 23:09:15 EST 2015

On 02/05/2015 01:32 PM, Lubomir I. Ivanov wrote:
> after staring at alSource.c for a while and finding this thread:
> http://openal.996291.n3.nabble.com/AL-SOFT-direct-channels-td3765.html
> apparently each multichannel source has to set AL_DIRECT_CHANNELS_SOFT
> for the virtualization to not happen (where a slight downmix is the
> result).

You generally want to avoid using that. With headphones/HRTF, for 
instance, a stereo buffer with direct channels will not sound great 
unless the sound was authored specifically for them. The reason to use 
direct channels is to play stereo sounds that have already had a 
binaural filter applied.

Out of curiosity, what speaker setup do you have? Normal stereo output 
should not have any bleed over with stereo buffers. There should only be 
some bleed over with HRTF (which is by design, and you don't want to 
prevent normally), or surround sound (although each channel is properly 
localized to +30/-30 degrees, where the speakers would be in such setups 

If you're using stereo speakers, check that they're not configured or 
detected as headphones by OpenAL Soft.

> ^ also i think this appears to be partially true - there is no way to
> control the stereo field of a stereo source, say a 0-100% (where 0% is
> a mono downmix) on the fly via a alSourcei() call. is that correct?
> :-)

There is the AL_EXT_STEREO_ANGLES extension 
<https://icculus.org/alextreg/wiki/AL_EXT_STEREO_ANGLES>. Although 
OpenAL Soft doesn't currently support it since the angles are supposed 
to default to +30/-30 degrees, and the lib fudges with the angles with 
stereo output to avoid bleed over (placing them at +90/-90 degrees with 
non-HRTF stereo output to align with the speakers). It definitely won't 
work with direct channels, since you can't map input channels directly 
to output channels and still pan each input channel.

More information about the openal mailing list