aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFranz Zotter <fzotter@users.sourceforge.net>2006-07-26 06:59:41 +0000
committerFranz Zotter <fzotter@users.sourceforge.net>2006-07-26 06:59:41 +0000
commitebee618de059be4182f25a44d56ad3e218c1653f (patch)
tree56e4ac16d18798e86c2d0f758ea6f094885d9662
parent269b58ae668965c08583949577c0c1064543c82c (diff)
mtx_sort: output order correction: from right to left.
svn path=/trunk/externals/iem/iemmatrix/; revision=5412
-rw-r--r--src/mtx_sort.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/mtx_sort.c b/src/mtx_sort.c
index f5d03dd..10217e0 100644
--- a/src/mtx_sort.c
+++ b/src/mtx_sort.c
@@ -100,12 +100,12 @@ static void *newMTXSort (t_symbol *s, int argc, t_atom *argv)
static void mTXSortBang (MTXSort *mtx_sort_obj)
{
- if (mtx_sort_obj->list_out1)
- outlet_anything(mtx_sort_obj->list_outlet1, gensym("matrix"),
- mtx_sort_obj->size+2, mtx_sort_obj->list_out1);
if (mtx_sort_obj->list_out2)
outlet_anything(mtx_sort_obj->list_outlet2, gensym("matrix"),
mtx_sort_obj->size+2, mtx_sort_obj->list_out2);
+ if (mtx_sort_obj->list_out1)
+ outlet_anything(mtx_sort_obj->list_outlet1, gensym("matrix"),
+ mtx_sort_obj->size+2, mtx_sort_obj->list_out1);
}
static void writeFloatIntoList (int n, t_atom *l, t_float *f)
@@ -333,16 +333,18 @@ static void mTXSortMatrix (MTXSort *mtx_sort_obj, t_symbol *s,
writeFloatIntoList (size, list_out2+2, i);
}
- SETSYMBOL(list_out1, gensym("matrix"));
- SETFLOAT(list_out1, rows);
- SETFLOAT(&list_out1[1], columns);
- outlet_anything(mtx_sort_obj->list_outlet1, gensym("matrix"),
- mtx_sort_obj->size+2, list_out1);
+ // writing indices
SETSYMBOL(list_out2, gensym("matrix"));
SETFLOAT(list_out2, rows);
SETFLOAT(&list_out2[1], columns);
outlet_anything(mtx_sort_obj->list_outlet2, gensym("matrix"),
mtx_sort_obj->size+2, list_out2);
+ // writing sorted values
+ SETSYMBOL(list_out1, gensym("matrix"));
+ SETFLOAT(list_out1, rows);
+ SETFLOAT(&list_out1[1], columns);
+ outlet_anything(mtx_sort_obj->list_outlet1, gensym("matrix"),
+ mtx_sort_obj->size+2, list_out1);
}
void mtx_sort_setup (void)