aboutsummaryrefslogtreecommitdiff
path: root/dmx512
diff options
context:
space:
mode:
authorIOhannes m zmölnig <zmoelnig@users.sourceforge.net>2008-06-13 13:42:01 +0000
committerIOhannes m zmölnig <zmoelnig@iem.at>2015-10-14 15:08:24 +0200
commitd63eaa6f1814f289c52cecaa4c7d76e765269549 (patch)
tree686fcf90a4f78240eb089ffca3b3616b26a6e24a /dmx512
parent44824cfa333691b8e300adbc47bcadcde6691979 (diff)
...
svn path=/trunk/externals/iem/dmx512/; revision=9994
Diffstat (limited to 'dmx512')
-rw-r--r--dmx512/src/dmxout.c26
1 files 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)
{