From d63eaa6f1814f289c52cecaa4c7d76e765269549 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?IOhannes=20m=20zm=C3=B6lnig?= Date: Fri, 13 Jun 2008 13:42:01 +0000 Subject: ... svn path=/trunk/externals/iem/dmx512/; revision=9994 --- dmx512/src/dmxout.c | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/dmx512/src/dmxout.c b/dmx512/src/dmxout.c index fc3a875..08d70b2 100644 --- a/dmx512/src/dmxout.c +++ b/dmx512/src/dmxout.c @@ -33,20 +33,6 @@ typedef struct _dmxout } t_dmxout; - -static void dmxout_doout(t_dmxout*x, short port, unsigned char value) -{ - dmx_t buffer[1] = {value}; - if(x->x_device<=0) { - pd_error(x, "no DMX universe found"); - return; - } - - lseek (x->x_device, sizeof(buffer)*port, SEEK_SET); /* set to the current channel */ - write (x->x_device, buffer, sizeof(buffer)); /* write the channel */ -} - - static void dmxout_close(t_dmxout*x) { if(x->x_device>=0) { @@ -78,6 +64,18 @@ static void dmxout_open(t_dmxout*x, t_symbol*s_devname) } } +static void dmxout_doout(t_dmxout*x, short port, unsigned char value) +{ + dmx_t buffer[1] = {value}; + if(x->x_device<=0) { + pd_error(x, "no DMX universe found"); + return; + } + + lseek (x->x_device, sizeof(buffer)*port, SEEK_SET); /* set to the current channel */ + write (x->x_device, buffer, sizeof(buffer)); /* write the channel */ +} + static void dmxout_float(t_dmxout*x, t_float f) { -- cgit v1.2.1