[openal] How to use AL_EFFECT_COMPRESSOR
Mariusz 'MX' Szaflik
mxadd at o2.pl
Thu Apr 3 13:38:33 EDT 2014
W dniu 2014-04-03 18:01, Chris Robinson pisze:
> On 04/03/2014 07:43 AM, Mariusz 'MX' Szaflik wrote:
>> Hi
>>
>> stupid (?) question - how to use AL_EFFECT_COMPRESSOR ? (openALSoft,
>> latest version)
>>
>> Source-+->DF1->(AUXILIARY_SEND_FILTER)->RVB->\
>> | |->[COMPRESSOR]->OUT
>> +->DF2------------------------------->/
>>
>>
>> DF1 is AL_FILTER_LOWPASS
>> DF2 is AL_FILTER_LOWPASS
>> RVB is AL_EFFECT_EAXREVERB
>>
>> how the COMPRESSOR fits into this ?
>> it should be where I wrote it above, but there is no chaining of global
>> effects - I'm right ?
>
> Unfortunately the way EFX effects work doesn't allow for using a
> compressor on the final output mix. It will only act on a given effect
> send, and further, OpenAL Soft will mix those effect sends to a mono
> stream (all sends mix to a mono buffer in the effect slot, without
> panning, then the effect itself will spread it to all output channels
> as appropriate).
ooohhh --- that was the 'wrong' thing testers were hearing on linux
on XAUDIO the sounds that go to the 'master' effect are 3d positioned
(if my system is 7.1 then 8 channels go to the master effect and 8
channels goes out to the final submix)
but on OpenAL this will be downmixed to mono - right ?
(it was not that doticeable because only about a half of the gain goes
thru the wet part, the dry path is still positioned i hear)
is there any chance in the future to fix this ? :>
so for now there is no way to use compressor ;(
seem that I need to go with hard route - fetch OALSoft and add some
'hacks' to the mixer to be able to query average volume before clipping
for each mixed packet
(with that feedback I will be able to lower gain of individual sources
to not produce clipping in next step)
then ofcouse use only my hacked version of openAL with the project
>
>> How OpenALSoft is dealing with clipping ?
>> I ask because there is much less clipping heard compared to XAudio2
>> version of sound engine.
>> (let's say i have 10 cannons on the ship firing at once - OpenAl version
>> sounds much better without compressor than the XAudio one - is there
>> some 'anti clipping' code in mixer ?)
>
> I don't know how XAudio works internally, but OpenAL Soft adds a bit
> of attenuation to mono sounds that get played centered, according to
> how many output channels there are. This means that centered mono
> sounds are slightly quieter, so they won't overflow as quickly/badly
> and the subsequent clamping won't be as noticeable.
>
> This attenuation is added so mono sounds will (roughly) keep the same
> perceived volume as when it's panned to one speaker. Otherwise, if a
> centered mono sound played 100% on all speakers, there would be up to
> 700% more power (for 7.1 output) compared to when it's panned to play
> on one speaker only. And IMO that's not very desirable for sounds that
> freely move around in 3D space.
> _______________________________________________
> openal mailing list
> openal at openal.org
> http://openal.org/mailman/listinfo/openal
>
More information about the openal
mailing list