void *hoa_sig_out_new(t_symbol *s, long ac, t_atom *av) { t_hoa_sig_out *x = (t_hoa_sig_out *)object_alloc(hoa_sig_out_class); void *hoaprocessor_parent = Get_HoaProcessor_Object(); long outlet_num = 0; if (ac && av && atom_gettype(av) == A_LONG) outlet_num = atom_getlong(av); x->extra = 0; x->comment = gensym(""); attr_args_process(x, ac, av); dsp_setup((t_pxobject *)x, 1); x->parent_patcher_index = Get_HoaProcessor_Patch_Index(hoaprocessor_parent); x->outlet_num = HoaProcessor_Get_IO_Index(hoaprocessor_parent, x->parent_patcher_index, (t_object*)x); x->outptrs_ptr = HoaProcessor_Get_Outptrs_Ptr(hoaprocessor_parent, Get_HoaProcessor_Patch_Index(hoaprocessor_parent)); x->declared_sig_outs = HoaProcessor_Get_Declared_Sigouts(hoaprocessor_parent); return (x); }
void *hoa_sig_in_new(t_symbol *s, long ac, t_atom *av) { t_hoa_sig_in *x = (t_hoa_sig_in *)object_alloc(hoa_sig_in_class); void *hoaprocessor_parent = Get_HoaProcessor_Object(); long declared_sig_ins; long inlet_num = 0; dsp_setup((t_pxobject *)x, 1); outlet_new((t_object *)x,"signal"); if (ac && av && atom_gettype(av) == A_LONG) inlet_num = atom_getlong(av); x->extra = 0; x->comment = gensym(""); attr_args_process(x, ac, av); x->parent_patcher_index = Get_HoaProcessor_Patch_Index(hoaprocessor_parent); x->parent_mode = HoaProcessor_Get_Mode(hoaprocessor_parent); if (x->parent_mode == gensym("post") || x->parent_mode == gensym("out")) { x->inlet_num = (inlet_num > 0) ? inlet_num : x->parent_patcher_index; } else if (x->parent_mode == gensym("no")) { x->inlet_num = (inlet_num > 0) ? inlet_num : 1; } x->valid = 0; declared_sig_ins = HoaProcessor_Get_Declared_Sigins(hoaprocessor_parent); x->sig_ins = (double**) HoaProcessor_Get_Sigins(hoaprocessor_parent); if (x->inlet_num <= declared_sig_ins && x->inlet_num >= 1) x->valid = 1; x->declared_sig_ins = declared_sig_ins; return (x); }
void *hoa_out_new(t_symbol *s, short ac, t_atom *av) { t_hoa_out *x = (t_hoa_out *)object_alloc(hoa_out_class); void *hoaprocessor_parent = Get_HoaProcessor_Object(); x->extra = 0; x->comment = gensym(""); attr_args_process(x, ac, av); x->parent_processor = (t_object*) hoaprocessor_parent; x->parent_patcher_index = Get_HoaProcessor_Patch_Index(hoaprocessor_parent); x->outlet_num = 1; long out = HoaProcessor_Get_IO_Index(hoaprocessor_parent, x->parent_patcher_index, (t_object*)x); if (out > 0) x->outlet_num = out; return (x); }
void *hoa_in_new(t_symbol *s, short argc, t_atom *argv) { t_hoa_in *x = (t_hoa_in *)object_alloc(hoa_in_class); void *hoaprocessor_parent = Get_HoaProcessor_Object(); x->out = outlet_new((t_object *)x, NULL); x->parent_patcher_index = Get_HoaProcessor_Patch_Index(hoaprocessor_parent); x->parent_mode = HoaProcessor_Get_Mode(hoaprocessor_parent); if (x->parent_mode == gensym("post") || x->parent_mode == gensym("out")) { x->inlet_num = x->parent_patcher_index; } else if (x->parent_mode == gensym("no")) { x->inlet_num = 1; } return (x); }
void *hoa_in_new(t_symbol *s, short ac, t_atom *av) { t_hoa_in *x = (t_hoa_in *)object_alloc(hoa_in_class); void *hoaprocessor_parent = Get_HoaProcessor_Object(); x->out = outlet_new((t_object *)x, NULL); x->inlet_num = 1; x->extra = 0; x->comment = gensym(""); attr_args_process(x, ac, av); x->parent_patcher_index = Get_HoaProcessor_Patch_Index(hoaprocessor_parent); x->parent_mode = HoaProcessor_Get_Mode(hoaprocessor_parent); long in = HoaProcessor_Get_IO_Index(hoaprocessor_parent, x->parent_patcher_index, (t_object*)x); if (in > 0) x->inlet_num = in; return (x); }