[MPlayer-dev-eng] ANNOUNCE: new audio filter layer in use

Anders Johansson ajh at watri.uwa.edu.au
Sun Oct 6 09:06:38 CEST 2002


Hi,

The new af layer is not stable yet, so please test it I want to find
the bugs. The code is auto-configuring so I think there will be quite a
lot of issues before it gets stable. Also delay in the filters is not
compensated for yet, I will add this soon.  This is however not a
problem yet cause there are no filters that have a noticeable delay
that can be enabled.

My plans for the audio filter layer are as follows:

1. Add a -format hint to try to force the audio out to use a specific
   format.  

2. Add functionality to enable filters on the command-line (what should
   the switch be called?). 

3. Add compensation for delay caused by the filters.

4. Add functionality to add filters during playback (remove already works).

5. Port form old plugins volume and eq.

6. Add functionality to mixer.c to control some of the audio
   filters. My goal is to extend it to have the same set of functions
   one can find on a professional mixer board for video editing. I will
   not write any graphical interface to any of these functions It will
   be up to someone else :). If anyone is interested in doing the
   graphical part please contact me and we can discuss the details and
   work out the interface. The planned functionality is this:
   6.1 Master volume - the mixer device should be probed and SW volume
       added if needed. This volume is the master volume controlling
       all channels.
   6.2 Balance front-back, left-right and separate volume for center
       and LFE.
   6.2 Equalizer, either one common or two (one for center/front and
       one for rear, LFE doesn't need one (perhaps there should be
       a separate one for center)).
   6.3 Set the delay for each channel to be able to move the listening
       position in the room.
   6.4 Adjustable playback speed.
   6.5 Interface for getting information (nr. of channels, volume,
       spectrum analysis, debug info, etc) from the audio stream,
       Gustavo has started this work already.
   6.6 Room expansion.

> Hi,
> 
> Ok i've finally finished and commited the integration of Anders' new audio
> filter library. I have to say it works fine!

Some comments:

1. Why did you remove the check for "in <= max_insize"? in

-  while(in <= max_insize && out <= max_outsize){
-    if(out > len)
-      return in;
-    out = t * (((in/t)*mul.n + 1)/mul.d);
+  while((out=t * (((in/t+1)*mul.n - 1)/mul.d)) <= max_outsize){
+    if( (t * (((in/t)*mul.n))/mul.d) >= len) return in;
     in+=t;
   }
?

2. In af_resample I had limited the output frequency to 8kHz cause it
   is the lowest sample frequency for any type of audio standard that
   I know of. The filter should work with sample frequencies between 1Hz
   to 2GHz but, and perhaps it is not up to us to try to control the
   user? I am however a bit unhappy to set a value below 8kHz cause I
   would hate to download a movie just to discover that some idiot
   have down-sampled the sound to 2Khz so that one can't hear what
   people say. I guess this is a bit of a philosophical question, but
   who am I to say :)

> 
> A'rpi / Astral & ESP-team
> 

//Anders




More information about the MPlayer-dev-eng mailing list