[openal] stereo separation issue with a stereo source

Lubomir I. Ivanov neolit123 at gmail.com
Fri Feb 6 08:37:27 EST 2015

hello and thanks for the reply,

On 6 February 2015 at 06:09, Chris Robinson <chris.kcat at gmail.com> wrote:
> 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.

some would argue about the HRTF topic, but i would agree.
question is why does openal-soft downmixes a 2 channel mix to
accommodate a virtual configuration or a headphone setup where there
is none and while all my audio related playback and recording software
(including winamp, cooledit, mediaplayerclassic etc.) doesn't by

> 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 anyway).

the current setup (quadro 2 front / 2 back).

the driver panel it's in the lines of this:

two observations after testing a little:
- for "stereo" is selected openal-soft uses direct channels
- for "quadro" the downmix in openal-soft is in action
- haven't tested 5.1, 7.1
(the sub-options for quadro don't seem to matter)

but like i said above, no other software does that and the front
speakers simply reproduce the direct channels stereo and same is
mirrored in the back, without any further virtualization. this is to
my knowledge what is called channel doubling.

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

alsoft.* seems to be missing.
any other way to check what the library uses?

currently what i do is just this:

ALCdevice *dev = alcOpenDevice(NULL);
ALCcontext *ctx = alcCreateContext(dev, NULL);

>> ^ 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.

i see. well, in DSP terms stereo field manipulation like channel angle
(phase rotation as they call it) and width (by adjusting the "side" or
left - right difference) it's quite trivial.
it should not matter if a previous downmix has happened or if we are
dealing with direct channels.

i have seen direct channel mapping that can be
stereo-field-manipulated in the Reaper DAW (http://www.reaper.fm/) and
overall i think it's pretty doable, but i would understand if it's
going to be difficult within the current openal-soft API.


More information about the openal mailing list