[MPlayer-dev-eng] [PATCH] af_pan: hard clipping, and more than 100% of source channels

Guillaume POIRIER poirierg at gmail.com
Sun Sep 11 14:01:32 CEST 2005


Hi,

On 9/11/05, Reimar Döffinger <Reimar.Doeffinger at stud.uni-karlsruhe.de> wrote:
> Hi,
> On Sun, Sep 11, 2005 at 01:00:22PM +0200, Guillaume POIRIER wrote:
> > Index: DOCS/man/en/mplayer.1
> > ===================================================================
> > RCS file: /cvsroot/mplayer/main/DOCS/man/en/mplayer.1,v
> > retrieving revision 1.1094
> > diff -u -r1.1094 mplayer.1
> > --- DOCS/man/en/mplayer.1     11 Sep 2005 08:00:22 -0000      1.1094
> > +++ DOCS/man/en/mplayer.1     11 Sep 2005 10:58:46 -0000
> > @@ -3925,7 +3925,14 @@
> >  .IPs <n>\ \
> >  number of input channels (1\-6)
> >  .IPs <lij>
> > -How much of input channel j is mixed into output channel i (0\-1).
> > +The multiple of input channel j which is to be mixed into output
> > +channel i (0-512, that is, 0% - 51200%).
> > +Be careful when using values higher than 1; higher values can be quite
> > +loud and may exceed the sample range of your sound card.
> 
> Actually this kind of things can happen when the absolute sum of all
> values for this output channel is > 1. Just in case you find a good way
> to express this without getting mathmatical.

I can't come up with a good description that would indeed not be too
mathematical. I guess I'll just file that matter in the "Joe doesn't
need to know it all" cabinet.


> > -      s->level[k][j] = clamp(s->level[k][j],0.0,1.0);
> > +      s->level[k][j] = clamp(s->level[k][j],0.0,MAX_LVL);
> 
> > -      s->level[ch][i] = clamp(level[i],0.0,1.0);
> > +      s->level[ch][i] = clamp(level[i],0.0,MAX_LVL);
> 
> I vote for replacing 0.0 with -MAX_LVL, too.
> Though explaining this in the man page might be a bit more difficult.

I won't oppose such change as I don't even know what could be the
added benefit. Okay, I should RTFS to figure it out maybe, but I'm a
lazy bastard with limited C knowledge ;-P.

Guillaume
-- 
Reading doesn't hurt, really!
  -- Dominik 'Rathann' Mierzejewski




More information about the MPlayer-dev-eng mailing list