Revision: 10119 http://pure-data.svn.sourceforge.net/pure-data/?rev=10119&view=rev Author: zmoelnig Date: 2008-06-30 04:13:10 -0700 (Mon, 30 Jun 2008)
Log Message: ----------- added "open"-mess (not functional yet) to change the device...
Modified Paths: -------------- trunk/externals/iem/dmx512/src/dmx4pd.h trunk/externals/iem/dmx512/src/dmxout.c
Modified: trunk/externals/iem/dmx512/src/dmx4pd.h =================================================================== --- trunk/externals/iem/dmx512/src/dmx4pd.h 2008-06-30 11:01:03 UTC (rev 10118) +++ trunk/externals/iem/dmx512/src/dmx4pd.h 2008-06-30 11:13:10 UTC (rev 10119) @@ -33,9 +33,9 @@
#define DMX4PD_POSTBANNER \ - { \ + do { \ post("DMX4PD ("DMX4PD_VERSION"): (c) 2008 IOhannes m zm\xF6lnig - iem @ kug"); \ - } + } while(0)
#endif /* INCLUDE_DMX4PD_H__ */
Modified: trunk/externals/iem/dmx512/src/dmxout.c =================================================================== --- trunk/externals/iem/dmx512/src/dmxout.c 2008-06-30 11:01:03 UTC (rev 10118) +++ trunk/externals/iem/dmx512/src/dmxout.c 2008-06-30 11:13:10 UTC (rev 10119) @@ -65,6 +65,7 @@
// strncpy(args[0], "--dmx", MAXPDSTRING); // strncpy(args[1], devname, MAXPDSTRING); + verbose(2, "[dmxout]: trying to open '%s'", args[1]); devname=DMXdev(&argc, argv); if(!devname){ pd_error(x, "couldn't find DMX device"); @@ -77,6 +78,8 @@ if(fd!=-1) { dmxout_close(x); x->x_device=fd; + } else { + error("failed to open DMX-device '%s'",devname); } }
@@ -217,12 +220,17 @@
void dmxout_setup(void) { +#ifdef DMX4PD_POSTBANNER + DMX4PD_POSTBANNER; +#endif + dmxout_class = class_new(gensym("dmxout"), (t_newmethod)dmxout_new, (t_method)dmxout_free, sizeof(t_dmxout), 0, A_GIMME, A_NULL);
class_addfloat(dmxout_class, dmxout_float); + class_addmethod(dmxout_class, (t_method)dmxout_open, gensym("open"), A_SYMBOL, A_NULL);
dmxout_class2 = class_new(gensym("dmxout"), (t_newmethod)dmxout_new, (t_method)dmxout_free, sizeof(t_dmxout), @@ -235,7 +243,5 @@ class_addmethod(dmxout_class2, (t_method)dmxout_port, gensym("port"), A_FLOAT, A_DEFFLOAT, A_NULL);
-#ifdef DMX4PD_POSTBANNER - DMX4PD_POSTBANNER -#endif + class_addmethod(dmxout_class2, (t_method)dmxout_open, gensym("open"), A_SYMBOL, A_NULL); }
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.