[openal] stereo separation issue with a stereo source

Lubomir I. Ivanov neolit123 at gmail.com
Sat Feb 7 14:25:28 EST 2015


On 7 February 2015 at 19:43, Chris Robinson <chris.kcat at gmail.com> wrote:
> On 02/06/2015 05:37 AM, Lubomir I. Ivanov wrote:
>>
>> 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
>> default.
>
>
> OpenAL Soft doesn't downmix a stereo stream. What it does is, basically, pan
> each channel of a multi-channel input buffer separately, to be positioned
> around a virtual listener, as if that channel was emanating from that
> position regardless if a speaker is actually present there or not.
>
> Part of this is required functionality (e.g. if you have a quad setup and
> try to play a 7.1 buffer, you need to keep the front-center and side
> channels), and part of it is a nicety (e.g. if you have headphones/HRTF, a
> 7.1 buffer will play filtered to sound as the channels are coming from the
> front, side, and back).
>
> The way OpenAL Soft does non-HRTF panning causes other nearby speakers to
> play some of the sound as well, however the gains are appropriately balanced
> so that the sound is "focused" in the direction it's panned to. Previously
> OpenAL Soft used a basic panpot method between the two closest speakers to
> the sound's angle, but that's not the greatest method (especially if you
> want to add true 3D speaker positions) and recently switched to third-order
> ambisonics.
>
> LFE is the only channel that's mapped directly to a specific output speaker,
> since it has no actual position. It only includes an omni-directional
> low-frequency signal intended for a speaker designed to play only low
> frequencies.
>

i see, so the "direct channels" extension is the only way it seems?

>> the current setup (quadro 2 front / 2 back).
>>
>> the driver panel it's in the lines of this:
>> http://i.stack.imgur.com/IVPSN.jpg
>>
>> 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.
>
>
> OpenAL Soft doesn't normally use a speaker-matching/doubling method. As
> mentioned above it virtualizes the channels, so that they sound as if they
> play from as close as possible to where they should play from, regardless if
> there's a physical speaker there or not.
>
> I did at one point try to do speaker matching when possible and only
> virtualize them when needed, but I found that the resulting volume was
> unbalanced -- a sound playing directly from a single speaker would not have
> the same loudness as one that was panned (even if it was panned to that
> speaker). See the commit message for f05a2b86cd59bd3827ce.
>

i'd be surprised if no one has ever brought this during the OpenAL history.
for quadro specifically or pehaps for other even-numbered channel
setups the virtualization should be a toggle, i would think.

if you are familiar with some of the home amplifier systems that were
popular in the 80's some were technically 2 channel, but were
considered quadro because of the channel doubling as they were 2 left,
2 right per amp-stage. some of them had the surround button, but it
was a toggle and i do not recall channel mixing / panning that was
always on.

also the odd part is that no other modern software that i've seen
virtualizes my quadro setup.

>>> 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?
>
>
> Set the environment variable ALSOFT_LOGLEVEL to 3 before running the app, to
> make the lib print out a bunch of info to stderr. If you want to write it to
> a file instead of standard output, set ALSOFT_LOGFILE (if you set a relative
> filename, it will be relative to the app's CWD when the lib initializes).
>

here is the relevant part:

AL lib: (II) ALCmmdevProxy_messageHandler: Got message 1024
(lparam=00954420, wparam=0028FBF8)
AL lib: (II) alcOpenDevice: Created device 005ED840, "Speakers (5-
Realtek HighDefinition Audio)"
AL lib: (II) GetConfigValue: Key hrtf not found
AL lib: (II) UpdateDeviceParams: Pre-reset: Stereo, Float, 44100hz,
1024 updatesize x4
AL lib: (II) ALCmmdevProxy_messageHandler: Got message 1025
(lparam=00954420, wparam=0028FBA8)
AL lib: (II) UpdateDeviceParams: Post-reset: Quadraphonic, Float,
48000hz, 960 update size x4
AL lib: (II) GetConfigValue: Key layouts/quad/enable not found
AL lib: (II) ALCmmdevProxy_messageHandler: Got message 1026
(lparam=00954420, wparam=0028FBA8)
AL lib: (II) alcCreateContext: Created context 006045A0

it does detect the quadro layout - anything else of importance? the
config file is simply missing as i don't have one.
so your comment about "speaker matching" suggests that the
viritualzation will be always on for anything above 2 channels and i
would assume and there is no way to disable it with OpenAL?

lubomir
--


More information about the openal mailing list