[vlc-devel] [PATCH 2/4] Adds the compressor module to VLC
Laurent Aimar
fenrir at elivagar.org
Thu Jul 1 22:06:20 CEST 2010
Hi,
On Thu, 2010-07-01 at 14:49 -0500, Ron Wright 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 think you forgot some deletes.
> Maybe creating a table with the variables names and the
> associated callbacks
> would simplify it ? Otherwise, adding the missing one is
> enough.
>
> Oops, I forgot to add those in.
No problem.
--
fenrir
More information about the vlc-devel
mailing list