[Mplayer-cvslog] CVS: main/libaf af.h,1.15,1.16 af_resample.c,1.18,1.19 af_volume.c,1.8,1.9
Anders Johansson CVS
anders at mplayerhq.hu
Fri Jan 10 02:45:37 CET 2003
Update of /cvsroot/mplayer/main/libaf
In directory mail:/var/tmp.root/cvs-serv1737/libaf
Modified Files:
af.h af_resample.c af_volume.c
Log Message:
10l bug for float conversion control + feature fix in volume control
Index: af.h
===================================================================
RCS file: /cvsroot/mplayer/main/libaf/af.h,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- af.h 10 Jan 2003 01:01:38 -0000 1.15
+++ af.h 10 Jan 2003 01:45:34 -0000 1.16
@@ -70,8 +70,8 @@
#define AF_INIT_TYPE_MASK 0x00000003
#define AF_INIT_INT 0x00000000
-#define AF_INIT_FLOAT 0x00000010
-#define AF_INIT_FORMAT_MASK 0x00000010
+#define AF_INIT_FLOAT 0x00000004
+#define AF_INIT_FORMAT_MASK 0x00000004
// Default init type
#ifndef AF_INIT_TYPE
Index: af_resample.c
===================================================================
RCS file: /cvsroot/mplayer/main/libaf/af_resample.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- af_resample.c 10 Jan 2003 01:01:38 -0000 1.18
+++ af_resample.c 10 Jan 2003 01:45:34 -0000 1.19
@@ -279,14 +279,14 @@
int rate=0;
int type=RSMP_INT;
int sloppy=1;
- sscanf((char*)arg,"%i:%i:%i", &rate, &type, &sloppy);
+ sscanf((char*)arg,"%i:%i:%i", &rate, &sloppy, &type);
s->setup = (sloppy?FREQ_SLOPPY:FREQ_EXACT) |
(clamp(type,RSMP_LIN,RSMP_FLOAT));
return af->control(af,AF_CONTROL_RESAMPLE_RATE | AF_CONTROL_SET, &rate);
}
case AF_CONTROL_POST_CREATE:
if((((af_cfg_t*)arg)->force & AF_INIT_FORMAT_MASK) == AF_INIT_FLOAT)
- ((af_resample_t*)af->setup)->setup |= RSMP_FLOAT;
+ ((af_resample_t*)af->setup)->setup = RSMP_FLOAT;
return AF_OK;
case AF_CONTROL_RESAMPLE_RATE | AF_CONTROL_SET:
// Reinit must be called after this function has been called
Index: af_volume.c
===================================================================
RCS file: /cvsroot/mplayer/main/libaf/af_volume.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- af_volume.c 10 Jan 2003 01:01:38 -0000 1.8
+++ af_volume.c 10 Jan 2003 01:45:34 -0000 1.9
@@ -83,8 +83,8 @@
return control(af,AF_CONTROL_VOLUME_LEVEL | AF_CONTROL_SET, vol);
}
case AF_CONTROL_POST_CREATE:
- s->fast = (((af_cfg_t*)arg)->force & AF_INIT_FORMAT_MASK) ==
- AF_INIT_FLOAT ? 1 : 0;
+ s->fast = ((((af_cfg_t*)arg)->force & AF_INIT_FORMAT_MASK) ==
+ AF_INIT_FLOAT) ? 0 : 1;
return AF_OK;
case AF_CONTROL_VOLUME_ON_OFF | AF_CONTROL_SET:
memcpy(s->enable,(int*)arg,AF_NCH*sizeof(int));
@@ -109,9 +109,12 @@
case AF_CONTROL_PRE_DESTROY:{
float m = 0.0;
int i;
- for(i=0;i<AF_NCH;i++)
- m=max(m,s->max[i]);
- af_msg(AF_MSG_INFO,"The maximum volume was %0.2fdB \n",10*log10(m));
+ if(!s->fast){
+ for(i=0;i<AF_NCH;i++)
+ m=max(m,s->max[i]);
+ af_msg(AF_MSG_INFO,"[volume] The maximum volume was %0.2fdB \n",
+ 10*log10(m));
+ }
return AF_OK;
}
}
More information about the MPlayer-cvslog
mailing list