File tree Expand file tree Collapse file tree 1 file changed +17
-3
lines changed
cyclone_objects/binaries/control Expand file tree Collapse file tree 1 file changed +17
-3
lines changed Original file line number Diff line number Diff line change @@ -255,7 +255,12 @@ static int zl_equal(t_atom *ap1, t_atom *ap2){
255
255
}
256
256
257
257
static void zl_sizecheck (t_zl * x , int size ){
258
- if (x -> x_modearg > size ) x -> x_modearg = size ;
258
+ if (x -> x_modearg > size ) {
259
+ x -> x_modearg = size ;
260
+ // Clear any existing data that might be beyond the new size
261
+ if (x -> x_outbuf1 .d_natoms > size )
262
+ x -> x_outbuf1 .d_natoms = size ;
263
+ }
259
264
}
260
265
261
266
static void zl_swap (t_atom * av , int i , int j ) {
@@ -1462,8 +1467,17 @@ static int zl_modeargfn(t_zl *x){
1462
1467
static void zl_setmodearg (t_zl * x , t_symbol * s , int ac , t_atom * av ){
1463
1468
if (zl_intargfn [x -> x_mode ]){
1464
1469
int i ;
1465
- if (zl_modesym [x -> x_mode ] == gensym ("group" ) && !ac )
1466
- i = ZL_DEF_SIZE ;
1470
+ if (zl_modesym [x -> x_mode ] == gensym ("group" )
1471
+ || zl_modesym [x -> x_mode ] == gensym ("stream" )){
1472
+ if (ac >= 1 && av -> a_type == A_FLOAT ){
1473
+ int f = (int )av -> a_w .w_float ;
1474
+ if f > x -> x_outbuf1 .d_max )
1475
+ f = x -> x_outbuf1 .d_max ;
1476
+ i = f ;
1477
+ }
1478
+ else
1479
+ i = 0 ;
1480
+ }
1467
1481
else
1468
1482
i = (!s && ac && av -> a_type == A_FLOAT ?
1469
1483
(int )av -> a_w .w_float : /* CHECKED silent truncation */
You can’t perform that action at this time.
0 commit comments