[openal] How to use AL_EFFECT_COMPRESSOR

Chris Robinson chris.kcat at gmail.com
Thu Apr 3 16:00:26 EDT 2014


On 04/03/2014 10:38 AM, Mariusz 'MX' Szaflik wrote:
> 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's only downmixed on the effect sends (wet path, for reverb and other 
effects), since processing effects with multi-channel input would be a 
performance problem. Sound on the direct/dry path will pan around on the 
available speakers.

I do intend on allowing effects to optionally take multi-channel input 
(for the ones realistically capable of it) and allowing effects to be 
chained together, and also allowing them to be put on the dry path 
(effectively generalizing all paths, and having a more flexible graph 
design).

> 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

It wouldn't be too difficult to add an extra compressor step after 
everything's been mixed together and you can track the final amplitude. 
This would be treated an implementation detail regarding how to handle 
large amplitudes, toggleable as a user option (on by default, as long as 
the processing cost isn't high).


More information about the openal mailing list