Skip to content
Snippets Groups Projects
Commit fc0822a0 authored by Jonathan Wilkes's avatar Jonathan Wilkes
Browse files

allow iem_spec2 objects to instantiate without arguments

parent b02fceba
No related branches found
No related tags found
No related merge requests found
......@@ -118,7 +118,16 @@ static void spec2_tab_conv_tilde_free(t_spec2_tab_conv_tilde *x)
static void *spec2_tab_conv_tilde_new(t_symbol *s, int argc, t_atom *argv)
{
t_spec2_tab_conv_tilde *x = (t_spec2_tab_conv_tilde *)pd_new(spec2_tab_conv_tilde_class);
t_atom sane_defaults[2];
if(!argc)
{
post("spec2_tab_conv~: warning: no arguments provided: setting defaults to "
"[spec2_tab_conv~ array1 0]");
SETSYMBOL(sane_defaults, gensym("array1"));
SETFLOAT(sane_defaults+1, 0.);
argv = sane_defaults;
argc = 2;
}
if((argc >= 2) && IS_A_SYMBOL(argv,0) && IS_A_FLOAT(argv,1))
{
x->x_sym_array = (t_symbol *)(atom_getsymbol(argv));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment