summaryrefslogtreecommitdiff
path: root/apps/plugins/pdbox/PDa/intern/vline~.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/pdbox/PDa/intern/vline~.c')
-rw-r--r--apps/plugins/pdbox/PDa/intern/vline~.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/apps/plugins/pdbox/PDa/intern/vline~.c b/apps/plugins/pdbox/PDa/intern/vline~.c
index 15f0d1793e..dc73f72571 100644
--- a/apps/plugins/pdbox/PDa/intern/vline~.c
+++ b/apps/plugins/pdbox/PDa/intern/vline~.c
@@ -1,3 +1,8 @@
1#ifdef ROCKBOX
2#include "plugin.h"
3#include "pdbox.h"
4#endif
5
1#include <m_pd.h> 6#include <m_pd.h>
2#include <m_fixed.h> 7#include <m_fixed.h>
3 8
@@ -36,7 +41,9 @@ static t_int *vline_tilde_perform(t_int *w)
36 t_sample f = x->x_value; 41 t_sample f = x->x_value;
37 t_sample inc = x->x_inc; 42 t_sample inc = x->x_inc;
38 t_time msecpersamp = x->x_msecpersamp; 43 t_time msecpersamp = x->x_msecpersamp;
44#ifndef ROCKBOX
39 t_time samppermsec = x->x_samppermsec; 45 t_time samppermsec = x->x_samppermsec;
46#endif
40 t_time timenow = clock_gettimesince(x->x_referencetime) - n * msecpersamp; 47 t_time timenow = clock_gettimesince(x->x_referencetime) - n * msecpersamp;
41 t_vseg *s = x->x_list; 48 t_vseg *s = x->x_list;
42 for (i = 0; i < n; i++) 49 for (i = 0; i < n; i++)
@@ -58,7 +65,7 @@ static t_int *vline_tilde_perform(t_int *w)
58 } 65 }
59 else 66 else
60 { 67 {
61 t_time incpermsec = div((s->s_target - f), 68 t_time incpermsec = idiv((s->s_target - f),
62 (s->s_targettime - s->s_starttime)); 69 (s->s_targettime - s->s_starttime));
63 f = mult(f + incpermsec,(timenext - s->s_starttime)); 70 f = mult(f + incpermsec,(timenext - s->s_starttime));
64 inc = mult(incpermsec,msecpersamp); 71 inc = mult(incpermsec,msecpersamp);
@@ -123,7 +130,7 @@ static void vline_tilde_float(t_vline *x, t_float f)
123 } 130 }
124 else 131 else
125 { 132 {
126 for (s1 = x->x_list; s2 = s1->s_next; s1 = s2) 133 for (s1 = x->x_list; (s2 = s1->s_next); s1 = s2)
127 { 134 {
128 if (s2->s_starttime > starttime || 135 if (s2->s_starttime > starttime ||
129 (s2->s_starttime == starttime && 136 (s2->s_starttime == starttime &&