diff options
Diffstat (limited to 'vlmax.c')
-rw-r--r-- | vlmax.c | 22 |
1 files changed, 11 insertions, 11 deletions
@@ -9,9 +9,9 @@ static t_class *vlmax_class; typedef struct _vlmax
{
t_object x_obj;
- float m_c_leak;
- float m_leak;
- float *m_max;
+ t_float m_c_leak;
+ t_float m_leak;
+ t_float *m_max;
int m_n;
} t_vlmax;
@@ -20,9 +20,9 @@ static void vlmax_perform(t_vlmax *x, t_symbol *s, int argc, t_atom *argv) {
int i;
t_atom *ap,*app;
- float *fp;
- float m_leak;
- float m_c_leak;
+ t_float *fp;
+ t_float m_leak;
+ t_float m_c_leak;
m_leak=x->m_leak;
m_c_leak=x->m_c_leak;
@@ -31,9 +31,9 @@ static void vlmax_perform(t_vlmax *x, t_symbol *s, int argc, t_atom *argv) int i;
if (x->m_max)
freebytes(x->m_max,x->m_n);
- x->m_max=(float*)getbytes(argc*sizeof(float));
+ x->m_max=(t_float*)getbytes(argc*sizeof(t_float));
for(i=0;i<argc;i++)
- x->m_max[i]=0.0f;
+ x->m_max[i]=0.0;
x->m_n=argc;
}
@@ -42,7 +42,7 @@ static void vlmax_perform(t_vlmax *x, t_symbol *s, int argc, t_atom *argv) app=ap;
for (i = 0; i < argc; i++)
{
- float f=atom_getfloat(argv++);
+ t_float f=atom_getfloat(argv++);
*fp =(f > *fp ) ? f : *fp *m_c_leak + f*m_leak;
SETFLOAT(app, *fp);
app++;
@@ -54,8 +54,8 @@ static void vlmax_perform(t_vlmax *x, t_symbol *s, int argc, t_atom *argv) static void vlmax_setHalfDecay(t_vlmax *x, t_floatarg halfDecayTime)
{
- x->m_c_leak=(float)powf(.5,(1.0f/halfDecayTime));
- x->m_leak=1.0f-x->m_c_leak;
+ x->m_c_leak=(t_float)powf(.5,(1.0/halfDecayTime));
+ x->m_leak=1.0-x->m_c_leak;
}
static void *vlmax_new(t_float halfDecayTime)
|