~ubuntu-branches/ubuntu/raring/pd-smlib/raring-proposed

« back to all changes in this revision

Viewing changes to vdbtorms.c

  • Committer: Package Import Robot
  • Author(s): Hans-Christoph Steiner
  • Date: 2012-09-25 12:20:08 UTC
  • mfrom: (1.1.1)
  • Revision ID: package-import@ubuntu.com-20120925122008-jhr5hyl3juh91eyv
Tags: 0.12.2-1
* updated to upstream version v0.12.2
* removed patches since they are in new upstream release
* bumped standards version to 3.9.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
9
9
    t_object x_obj;
10
10
} t_vdbtorms;
11
11
 
12
 
float dbtorms(float f)
 
12
static t_float decibelbtorms(t_float f)
13
13
{
14
14
    if (f <= 0)
15
15
        return(0);
18
18
        if (f > 485)
19
19
            f = 485;
20
20
    }
21
 
    return (float)(exp((LOGTEN * 0.05) * (f-100.)));
 
21
    return (t_float)(exp((LOGTEN * 0.05) * (f-100.)));
22
22
}
23
23
 
24
24
static void vdbtorms_perform(t_vdbtorms *x, t_symbol *s, int argc, t_atom *argv)
30
30
 
31
31
        for (i = 0; i < argc; i++)
32
32
        {
33
 
                SETFLOAT(app, dbtorms(atom_getfloat(argv++)));
 
33
                SETFLOAT(app, decibelbtorms(atom_getfloat(argv++)));
34
34
                app++;
35
35
        }
36
36
        outlet_list(x->x_obj.ob_outlet,gensym("list"),argc,ap);