[vlc-devel] [PATCH 2/4] Adds the compressor module to VLC

Laurent Aimar fenrir at elivagar.org
Wed Jul 14 20:33:50 CEST 2010


Hi,

On Thu, Jul 01, 2010 at 10:06:20PM +0200, Laurent Aimar wrote:
> > But then, how can you tell if the equalizer will go before or after
> > the compressor on instantiation?  Priority is important when it comes
> > to dynamic range compressors, as there is a significant difference
> > between equalization before compression and compression before
> > equalization.  Read the blue box at
> > http://www.soundonsound.com/sos/jan01/articles/advanced.asp.
> > 
> > It's almost like asking yourself, given two distinct functions f(x)
> > and g(x), is f(g(x)) really equal to g(f(x))?  The answer is obvious:
> > not always, since the composition of functions is not commutative.
> > This means that the audio controls in a certain order will exhibit
> > behavior that changes when the order is swapped.
> > 
> > Here is an example.  Assume the older patches are used to compile VLC.
> > Also assume that the parametric equalizer, main equalizer, and
> > compressor are enabled.  Because the equalizers and compressor have
> > score 0, there are six different ways for the audio to be processed,
> > and four of these ways will have a major impact as to how the audio is
> > output.  If the ordering is not explicit, then the compressor is not
> > suitable for use with either equalizer.
> > 
> > Considering the information that I have just mentioned, if you can
> > help me find a better way to implement the equalization part (without
> > changing the scores in the other modules), let me know.  My most
> > reasonable guess is that my module belongs in a category other than
> > audio filters.  (Is it possible that I need to add a new module
> > category known as "audio_processors"?)
>  The order in which the filter are inserted is defined by the value of
> the aout variable "audio-filter".
>  For example "audio-filter" == "compressor:equalizer" will insert the
> compressor first and then the equalizer (whatever are the modules
> priority).
> 
>  This variable is updated when you call aout_EnableFilter() which then
> calls AoutChangeFilterString() defined in
> src/audio_output/aout_internal.h.
> If you want to impose an order, you can simply modify this function.
 I have done the modification on the aout part. To impose the order of
the insertion of your module, you simply have to define the order associated
to it in FilterOrder in src/audio_output/common.c. If you give an
explicit order, it will always be inserted before any other module.

Regards,

-- 
fenrir




More information about the vlc-devel mailing list