Update of /cvsroot/pure-data/externals/plugin~ In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8556
Modified Files: ChangeLog SConstruct plugin~-help.pd plugin~.c plugin~.h Log Message: adding 'active', fixing one of the segfaults...
Index: SConstruct =================================================================== RCS file: /cvsroot/pure-data/externals/plugin~/SConstruct,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** SConstruct 29 Apr 2005 00:43:36 -0000 1.1 --- SConstruct 30 Apr 2005 20:30:53 -0000 1.2 *************** *** 4,8 **** prefix = "/usr/local/lib/pd"
! env = Environment(CPPPATH = Split(prefix + '/src /usr/include /usr/local/include . ../../pd/src ../../src src'), CPPDEFINES=['PD','UNIX'], SHLIBPREFIX = '', SHLIBSUFFIX = '.pd_linux', CCFLAGS = '-pipe -O2 -fPIC')
external = env.SharedLibrary('plugin~',glob.glob('*.c')) --- 4,8 ---- prefix = "/usr/local/lib/pd"
! env = Environment(CPPPATH = Split(prefix + '/src /usr/include /usr/local/include . ../../pd/src ../../src src'), CPPDEFINES=['PD','UNIX'], SHLIBPREFIX = '', SHLIBSUFFIX = '.pd_linux', CCFLAGS = '-pipe -O2 -g')
external = env.SharedLibrary('plugin~',glob.glob('*.c'))
Index: plugin~.c =================================================================== RCS file: /cvsroot/pure-data/externals/plugin~/plugin~.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** plugin~.c 30 Apr 2005 07:38:55 -0000 1.4 --- plugin~.c 30 Apr 2005 20:30:53 -0000 1.5 *************** *** 53,57 **** class_addmethod (plugin_tilde_class,(t_method)plugin_tilde_list,gensym ("listplugins"),0); class_addmethod (plugin_tilde_class,(t_method)plugin_tilde_plug,gensym ("plug"),A_DEFSYM,0); ! class_addmethod (plugin_tilde_class,(t_method)plugin_tilde_bypass,gensym ("bypass"),A_DEFFLOAT,0); class_addmethod (plugin_tilde_class,(t_method)plugin_tilde_reset,gensym ("reset"),0); class_addmethod (plugin_tilde_class,nullfn,gensym ("signal"),0); --- 53,57 ---- class_addmethod (plugin_tilde_class,(t_method)plugin_tilde_list,gensym ("listplugins"),0); class_addmethod (plugin_tilde_class,(t_method)plugin_tilde_plug,gensym ("plug"),A_DEFSYM,0); ! class_addmethod (plugin_tilde_class,(t_method)plugin_tilde_active,gensym ("active"),A_DEFFLOAT,0); class_addmethod (plugin_tilde_class,(t_method)plugin_tilde_reset,gensym ("reset"),0); class_addmethod (plugin_tilde_class,nullfn,gensym ("signal"),0); *************** *** 79,98 **** x->dsp_vec = NULL; x->dsp_vec_length = 0;
! if (s_lib_name != NULL) { ! if (s_lib_name->s_name == NULL || strlen (s_lib_name->s_name) == 0) { x->plugin_library_filename = plugin_tilde_search_plugin (x, s_name->s_name); ! if (x->plugin_library_filename == NULL) { ! post("plugin~: plugin not found in any library"); ! } ! } ! else { x->plugin_library_filename = strdup (s_lib_name->s_name); } - if (plugin_tilde_open_plugin (x, - s_name->s_name, - x->plugin_library_filename, - (unsigned long)sys_getsr ())) - post("plugin~: Unable to open plugin"); }
--- 79,96 ---- x->dsp_vec = NULL; x->dsp_vec_length = 0; + x->dsp_active = 0;
! if (s_name->s_name != NULL) { ! if (s_lib_name->s_name == NULL || strlen (s_lib_name->s_name) == 0) x->plugin_library_filename = plugin_tilde_search_plugin (x, s_name->s_name); ! else x->plugin_library_filename = strdup (s_lib_name->s_name); + if (x->plugin_library_filename != NULL) { + if (plugin_tilde_open_plugin (x, + s_name->s_name, + x->plugin_library_filename, + (unsigned long)sys_getsr ())) + post("plugin~: Unable to open plugin"); } }
*************** *** 340,344 **** }
! static void plugin_tilde_bypass (Pd_Plugin_Tilde* x) { }
--- 338,345 ---- }
! static void plugin_tilde_active (Pd_Plugin_Tilde* x, t_float active) { ! ! x->dsp_active = active; ! }
*************** *** 417,425 **** ret = plugin_tilde_ladspa_open_plugin (x, name, lib_name, sample_rate);
! ! ! post("plugin~: plugin active"); ! !
// plugin_tilde_info (x); --- 418,425 ---- ret = plugin_tilde_ladspa_open_plugin (x, name, lib_name, sample_rate);
! if (ret == 0) { ! x->dsp_active = 1; ! post("plugin~: plugin active"); ! }
// plugin_tilde_info (x); *************** *** 447,453 **** {
plugin_tilde_ladspa_apply_plugin (x);
- }
--- 447,453 ---- {
+ if (x->dsp_active == 1) plugin_tilde_ladspa_apply_plugin (x);
}
Index: plugin~.h =================================================================== RCS file: /cvsroot/pure-data/externals/plugin~/plugin~.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** plugin~.h 30 Apr 2005 07:38:55 -0000 1.4 --- plugin~.h 30 Apr 2005 20:30:53 -0000 1.5 *************** *** 54,57 **** --- 54,58 ---- t_int* dsp_vec; unsigned dsp_vec_length; + unsigned dsp_active;
} Pd_Plugin_Tilde; *************** *** 81,85 **** static void plugin_tilde_info (Pd_Plugin_Tilde* x); static void plugin_tilde_plug (Pd_Plugin_Tilde* x, t_symbol* plug_name); ! static void plugin_tilde_bypass (Pd_Plugin_Tilde* x); /* First inlet message callback for "reset" messages */ static void plugin_tilde_reset (Pd_Plugin_Tilde* x); --- 82,86 ---- static void plugin_tilde_info (Pd_Plugin_Tilde* x); static void plugin_tilde_plug (Pd_Plugin_Tilde* x, t_symbol* plug_name); ! static void plugin_tilde_active (Pd_Plugin_Tilde* x, t_float active); /* First inlet message callback for "reset" messages */ static void plugin_tilde_reset (Pd_Plugin_Tilde* x);
Index: plugin~-help.pd =================================================================== RCS file: /cvsroot/pure-data/externals/plugin~/plugin~-help.pd,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** plugin~-help.pd 30 Apr 2005 07:38:55 -0000 1.2 --- plugin~-help.pd 30 Apr 2005 20:30:53 -0000 1.3 *************** *** 1,3 **** ! #N canvas 0 82 939 822 12; #X obj 497 2 adc~; #X obj 450 78 dac~; --- 1,3 ---- ! #N canvas 0 220 950 684 12; #X obj 497 2 adc~; #X obj 450 78 dac~; *************** *** 25,34 **** #X obj 560 107 prepend add; #X obj 658 109 prepend add; ! #X obj 298 47 plugin~ tap_equalizer; #X obj 41 69 widget q q1 -width 24 -bg gray -fg purple -height 18; #X obj 107 76 unpack s f f; ! #X obj 298 66 route port; ! #X obj 298 85 route in; ! #X obj 298 104 route control; #X obj 87 76 a2l; #X msg 238 70 add $1; --- 25,34 ---- #X obj 560 107 prepend add; #X obj 658 109 prepend add; ! #X obj 319 50 plugin~ tap_equalizer; #X obj 41 69 widget q q1 -width 24 -bg gray -fg purple -height 18; #X obj 107 76 unpack s f f; ! #X obj 298 100 route port; ! #X obj 298 119 route in; ! #X obj 298 138 route control; #X obj 87 76 a2l; #X msg 238 70 add $1; *************** *** 44,51 **** #X msg 112 393 move swarm; #X msg 120 373 move; ! #X obj 335 28 prepend control; ! #X text 557 7 plugin~; #X text 570 23 currently supports LADSPA; - #X obj 427 47 plugin~ tap_equalizer; #X text 643 400 if you can see this , you need widgets from /extensions/gui/ix ; --- 44,50 ---- #X msg 112 393 move swarm; #X msg 120 373 move; ! #X obj 369 8 prepend control; ! #X text 557 7 plusgin~; #X text 570 23 currently supports LADSPA; #X text 643 400 if you can see this , you need widgets from /extensions/gui/ix ; *************** *** 61,69 **** #X text 916 85 maker; #X obj 559 667 route symbol; ! #X msg 427 28 plug $1; #X connect 0 0 21 1; ! #X connect 0 1 43 1; #X connect 2 0 32 0; ! #X connect 2 0 21 0; #X connect 3 0 21 0; #X connect 4 0 18 0; --- 60,70 ---- #X text 916 85 maker; #X obj 559 667 route symbol; ! #X msg 497 45 plug $1; ! #X obj 590 59 plugain~; ! #X obj 422 28 demux; #X connect 0 0 21 1; ! #X connect 0 1 56 1; #X connect 2 0 32 0; ! #X connect 2 0 57 0; #X connect 3 0 21 0; #X connect 4 0 18 0; *************** *** 79,83 **** #X connect 9 0 6 0; #X connect 10 0 11 0; ! #X connect 10 0 55 0; #X connect 11 0 12 0; #X connect 12 0 5 0; --- 80,84 ---- #X connect 9 0 6 0; #X connect 10 0 11 0; ! #X connect 10 0 54 0; #X connect 11 0 12 0; #X connect 12 0 5 0; *************** *** 112,119 **** #X connect 32 0 22 0; #X connect 32 0 31 0; ! #X connect 32 0 45 0; #X connect 33 0 40 0; ! #X connect 34 0 47 0; ! #X connect 34 1 46 0; #X connect 34 1 35 1; #X connect 35 0 37 0; --- 113,120 ---- #X connect 32 0 22 0; #X connect 32 0 31 0; ! #X connect 32 0 44 0; #X connect 33 0 40 0; ! #X connect 34 0 46 0; ! #X connect 34 1 45 0; #X connect 34 1 35 1; #X connect 35 0 37 0; *************** *** 122,131 **** #X connect 38 0 33 0; #X connect 39 0 33 0; ! #X connect 40 0 21 0; ! #X connect 40 0 43 0; ! #X connect 43 1 1 1; ! #X connect 45 0 33 0; ! #X connect 46 0 47 1; ! #X connect 47 0 36 0; #X connect 55 0 56 0; ! #X connect 56 0 43 0; --- 123,134 ---- #X connect 38 0 33 0; #X connect 39 0 33 0; ! #X connect 40 0 57 0; ! #X connect 44 0 33 0; ! #X connect 45 0 46 1; ! #X connect 46 0 36 0; ! #X connect 54 0 55 0; #X connect 55 0 56 0; ! #X connect 56 0 24 0; ! #X connect 56 1 1 1; ! #X connect 57 0 21 0; ! #X connect 57 1 56 0;
Index: ChangeLog =================================================================== RCS file: /cvsroot/pure-data/externals/plugin~/ChangeLog,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ChangeLog 30 Apr 2005 07:38:55 -0000 1.3 --- ChangeLog 30 Apr 2005 20:30:53 -0000 1.4 *************** *** 2,11 ****
* VST support is gone, actually, it was never here, but removed some stuff to clean it up, VST? detour to /externals/grill/vst/ ! new methods: * listplugins: lists all your LADSPA plugins... * info: info on the current plugin, like assignable params, etc. * plug: load a new plug ! 2001-04-04 Jarno Seppänen <jams@cs.tut.fi (Jarno Seppanen)>
--- 2,13 ----
* VST support is gone, actually, it was never here, but removed some stuff to clean it up, VST? detour to /externals/grill/vst/ ! * you can create the plugin without arguments, it will default to 2 channels ! new methods: + * active: enable or disable the plugin * listplugins: lists all your LADSPA plugins... * info: info on the current plugin, like assignable params, etc. * plug: load a new plug ! 2001-04-04 Jarno Seppänen <jams@cs.tut.fi (Jarno Seppanen)>