From 50a389bea35a91ddae1394c5d35a6f1c703f5bdd Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Tue, 9 Mar 2004 03:51:28 +0000 Subject: Checked in Olaf's 1.5.2 sources. Here are the changes: v 1.5.2 (17. december 2003): - modified netclient for not to drop received data: use of syspollfn instead of clock to poll for incoming data, circular recv buffer v 1.5 (18. october 2003): - added some usefull features to arraycopy (i.e. copying just parts of an array and copying to specified position in destination array) - new object: nchange - IRIX 6.5 port (for GCC 3.3) - OS X binary (Jaguar 10.2.6) v 1.4 (22. may 2003): - updated sources to compile with Pd0.37-test4 - new object: arraycopy v 1.3 (12. april 2003): - new objects: sync listfifo - all setup routines renamed to maxlib__setup() to avoid name clashes, old names still work via class_addcreator() - some improvements for the help files svn path=/trunk/externals/maxlib/; revision=1394 --- src/arbran.c | 27 ++++++--------------------- 1 file changed, 6 insertions(+), 21 deletions(-) (limited to 'src/arbran.c') diff --git a/src/arbran.c b/src/arbran.c index cb39963..ba19976 100644 --- a/src/arbran.c +++ b/src/arbran.c @@ -58,14 +58,7 @@ static void rand_arbran_pdfscale(t_rand_arbran *x) t_int k = 0; t_float *tx, *tp; t_int ix, ip; - - if(!bx || !bp) - { - post("arbran: no arrays: pdfscale!"); - return; - } - - if (!garray_getfloatarray(bx, &ix, &tx)) + if (!garray_getfloatarray(bx, &ix, &tx)) { post("arbran: couldn't read from array!"); return; @@ -94,19 +87,11 @@ static void rand_arbran_bang(t_rand_arbran *x) t_int k = 0; t_float *tx, *tp; t_int ix, ip; - - if(!bx || !bp) - { - post("arbran: no arrays: bang!"); - return; - } - - if (!garray_getfloatarray(bx, &ix, &tx)) + if (!garray_getfloatarray(bx, &ix, &tx)) { post("arbran: couldn't read from array!"); return; } - if (!garray_getfloatarray(bp, &ip, &tp)) { post("arbran: couldn't read from array!"); @@ -114,6 +99,7 @@ static void rand_arbran_bang(t_rand_arbran *x) } a = 0; + a0 = 0; u = fran(); while(u > a) { @@ -173,10 +159,9 @@ static void *rand_arbran_new(t_symbol *s1, t_symbol *s2) t_rand_arbran *x = (t_rand_arbran *)pd_new(rand_arbran_class); srand( (unsigned)time( NULL ) ); outlet_new(&x->x_obj, &s_float); - rand_arbran_setarrays(x, s1, s2); - /* x->x_x = s1; - x->x_p = s2; - rand_arbran_set(x); */ + x->x_x = s1; + x->x_p = s2; + rand_arbran_set(x); return (x); } -- cgit v1.2.1