diff options
Diffstat (limited to 'apps/plugins/pdbox/PDa/intern/cos~.c')
-rw-r--r-- | apps/plugins/pdbox/PDa/intern/cos~.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/apps/plugins/pdbox/PDa/intern/cos~.c b/apps/plugins/pdbox/PDa/intern/cos~.c index 9e2d61f848..f787496c16 100644 --- a/apps/plugins/pdbox/PDa/intern/cos~.c +++ b/apps/plugins/pdbox/PDa/intern/cos~.c | |||
@@ -36,10 +36,20 @@ static t_int *cos_perform(t_int *w) | |||
36 | phase = *in++; | 36 | phase = *in++; |
37 | phase &= ((1<<fix1)-1); | 37 | phase &= ((1<<fix1)-1); |
38 | off = fixtoi((long long)phase<<ILOGCOSTABSIZE); | 38 | off = fixtoi((long long)phase<<ILOGCOSTABSIZE); |
39 | 39 | #ifdef ROCKBOX | |
40 | #ifdef NO_INTERPOLATION | ||
41 | *out = *(tab+off); | ||
42 | #else /* NO_INTERPOLATION */ | ||
43 | frac = phase & ((1<<(fix1-ILOGCOSTABSIZE))-1); | ||
44 | frac <<= ILOGCOSTABSIZE; | ||
45 | *out = mult(*(tab + off ), (itofix(1) - frac)) + | ||
46 | mult(*(tab + off + 1), frac); | ||
47 | #endif /* NO_INTERPOLATION */ | ||
48 | #else /* ROCKBOX */ | ||
40 | frac = phase&(itofix(1)-1); | 49 | frac = phase&(itofix(1)-1); |
41 | *out = mult(*(tab + off),itofix(1) - frac) + | 50 | *out = mult(*(tab + off),itofix(1) - frac) + |
42 | mult(*(tab + off + 1),frac); | 51 | mult(*(tab + off + 1),frac); |
52 | #endif /* ROCKBOX */ | ||
43 | out++; | 53 | out++; |
44 | } | 54 | } |
45 | return (w+4); | 55 | return (w+4); |