[MPlayer-cvslog] CVS: main/libaf af_pan.c,1.6,1.7

Corey Hickey bugfood-ml at fatooh.org
Thu Sep 15 22:30:49 CEST 2005


Reimar Döffinger CVS wrote:
>      while((*cp == ':') && (k < AF_NCH)){
> -      sscanf(cp, ":%f%n" , &s->level[k][j], &n);
> -      s->level[k][j] = clamp(s->level[k][j],0.0,1.0);
> +      sscanf(cp, ":%f%n" , &s->level[j][k], &n);
>        af_msg(AF_MSG_VERBOSE,"[pan] Pan level from channel %i to" 
> -	     " channel %i = %f\n",j,k,s->level[k][j]);
> +	     " channel %i = %f\n",k,j,s->level[j][k]);
>        cp =&cp[n];
>        j++;
>        if(j>=nch){

You switched j and k. Are you sure you want to do that? It changes the
way the suboptions must be ordered to achieve the desired output.
Previously (and this is consistent with the documentation), suboptions
were grouped by destination. Now they are grouped by source. For
instance, consider using pan to move the left channel's audio to the
right channel.

Previously:
-af pan=num:dst0-from-src0:dst0-from-src1:dst1-from-src0:dst1-from-src1
-af pan=2:0:0:1:0

Now:
-af pan=num:src0-to-dst0:src0-to-dst1:src1-to-dst0:src1-to-dst1
-af pan=2:0:1:0:0

I could make arguments in favor of either method being easier or more
intuitive, but in my opinion we should not silently change the current
behavior. ...especially since I'd have to change a bunch of the
documentation. :)

-Corey




More information about the MPlayer-cvslog mailing list