Commit a00059ba authored by Jonathan Wilkes's avatar Jonathan Wilkes

can get to munger_perform without crash

parent 838c8625
...@@ -840,6 +840,12 @@ static void munger_setbuffer(t_disis_munger *x, t_symbol *s, int argc, ...@@ -840,6 +840,12 @@ static void munger_setbuffer(t_disis_munger *x, t_symbol *s, int argc,
if (x->x_arraylength) munger_clearbuffer(x); if (x->x_arraylength) munger_clearbuffer(x);
// save buffer munger_name // save buffer munger_name
x->x_arrayname = atom_getsymbolarg(0, argc, argv); x->x_arrayname = atom_getsymbolarg(0, argc, argv);
/* If our name is NULL then just clear out and return... */
if (!x->x_arrayname)
{
munger_clearbuffer(x);
return;
}
// make new reference to system buffer object // make new reference to system buffer object
// no Buffer type, and no new! // no Buffer type, and no new!
// x->x_l_buf = new buffer(x->x_arrayname); // x->x_l_buf = new buffer(x->x_arrayname);
...@@ -864,6 +870,7 @@ static void munger_setbuffer(t_disis_munger *x, t_symbol *s, int argc, ...@@ -864,6 +870,7 @@ static void munger_setbuffer(t_disis_munger *x, t_symbol *s, int argc,
// no Buffer type // no Buffer type
x->x_l_chan = 0; x->x_l_chan = 0;
} }
} }
else else
{ {
...@@ -1664,6 +1671,7 @@ static t_int *munger_perform(t_int *w) ...@@ -1664,6 +1671,7 @@ static t_int *munger_perform(t_int *w)
if (x->x_gpan_spread > 1.) x->x_gpan_spread = 1.; if (x->x_gpan_spread > 1.) x->x_gpan_spread = 1.;
if (x->x_gpan_spread < 0.) x->x_gpan_spread = 0.; if (x->x_gpan_spread < 0.) x->x_gpan_spread = 0.;
if (!x->x_power) if (!x->x_power)
{ {
while(n--) while(n--)
...@@ -1786,7 +1794,7 @@ static t_int *munger_perform(t_int *w) ...@@ -1786,7 +1794,7 @@ static t_int *munger_perform(t_int *w)
} }
} }
} }
return (w + 3 + x->x_num_channels); return (w + 4 + x->x_num_channels);
} }
static void munger_dsp(t_disis_munger *x, t_signal **sp) static void munger_dsp(t_disis_munger *x, t_signal **sp)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment