~ubuntu-branches/ubuntu/trusty/pd-smlib/trusty

« back to all changes in this revision

Viewing changes to vthreshold.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:
12
12
    t_outlet *x_outlet2;        /* bang out for low thresh */
13
13
    int *x_state;                       /* 1 = high, 0 = low */
14
14
        int x_n;
15
 
    float x_hithresh;           /* value of high vthreshold */
16
 
    float x_lothresh;           /* value of low vthreshold */
17
 
    float x_hideadtime;         /* hi dead */
18
 
    float x_lodeadtime;         /* lo dead */
 
15
    t_float x_hithresh;         /* value of high vthreshold */
 
16
    t_float x_lothresh;         /* value of low vthreshold */
 
17
    t_float x_hideadtime;               /* hi dead */
 
18
    t_float x_lodeadtime;               /* lo dead */
19
19
} t_vthreshold;
20
20
 
21
21
    /* "set" message to specify vthresholds and dead times */
62
62
        if (argc>x->x_n) argc=x->x_n;
63
63
        for (i=0;i<argc;i++)
64
64
        {
65
 
                float f;
 
65
                t_float f;
66
66
                f=atom_getfloat(argv++);
67
67
 
68
68
                if (*state<0)
69
69
                {
70
70
                        if (f>x->x_hithresh)
71
71
                        {
72
 
                                outlet_float(x->x_outlet1, (float)i); // on
 
72
                                outlet_float(x->x_outlet1, (t_float)i); // on
73
73
                                *state=1;
74
74
                        }
75
75
                }
77
77
                {
78
78
                        if (f<x->x_lothresh)
79
79
                        {
80
 
                                outlet_float(x->x_outlet2, (float)i); // off
 
80
                                outlet_float(x->x_outlet2, (t_float)i); // off
81
81
                                *state=-1;
82
82
                        }
83
83
                }