aboutsummaryrefslogtreecommitdiff
path: root/src/blockshuffle~.c
diff options
context:
space:
mode:
authorIOhannes m zmölnig <zmoelnig@users.sourceforge.net>2007-10-30 09:21:52 +0000
committerIOhannes m zmölnig <zmoelnig@users.sourceforge.net>2007-10-30 09:21:52 +0000
commit5e869f7a0cef88be3b03272303a6084b8bd1a7e3 (patch)
tree8d5e0dfc39eb696f5b457b3376dd6eb7de17b538 /src/blockshuffle~.c
parent6d61e2a46722b75c1a3734e3419ee2886b11b2b3 (diff)
use t_float and t_sample when possible
svn path=/trunk/externals/zexy/; revision=8907
Diffstat (limited to 'src/blockshuffle~.c')
-rw-r--r--src/blockshuffle~.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/blockshuffle~.c b/src/blockshuffle~.c
index d8a337b..41f0301 100644
--- a/src/blockshuffle~.c
+++ b/src/blockshuffle~.c
@@ -67,7 +67,7 @@ static void blockshuffle_list(t_blockshuffle *x, t_symbol*s, int argc, t_atom*ar
x->shuffle=0;
}
x->shufflesize=argc;
- x->shuffle=getbytes(sizeof(t_float)*argc);
+ x->shuffle=getbytes(sizeof(*x->shuffle)*argc);
for(i=0; i<argc; i++){
x->shuffle[i]=atom_getfloat(argv++);
@@ -86,13 +86,13 @@ static t_int *blockshuffle_perform(t_int *w)
t_int *idx =x->indices;
if(idx){
- for(i=0; i<n; i++){
- temp[i]=in[idx[i]];
- }
- temp=x->blockbuf;
- for(i=0; i<n; i++){
- *out++=*temp++;
- }
+ for(i=0; i<n; i++){
+ temp[i]=in[idx[i]];
+ }
+ temp=x->blockbuf;
+ for(i=0; i<n; i++){
+ *out++=*temp++;
+ }
} else
while(n--)*out++=*in++;
@@ -114,9 +114,9 @@ static void blockshuffle_helper(void)
post("outlet : signal~");
}
static void blockshuffle_free(t_blockshuffle *x){
- if(x->indices) freebytes(x->indices, sizeof(t_int) *x->size);
- if(x->blockbuf)freebytes(x->blockbuf, sizeof(t_sample)*x->size);
- if(x->shuffle) freebytes(x->shuffle, sizeof(t_float) *x->shufflesize);
+ if(x->indices) freebytes(x->indices, sizeof(*x->indices) *x->size);
+ if(x->blockbuf)freebytes(x->blockbuf, sizeof(*x->blockbuf)*x->size);
+ if(x->shuffle) freebytes(x->shuffle, sizeof(*x->shuffle) *x->shufflesize);
}
static void *blockshuffle_new(void)