aboutsummaryrefslogtreecommitdiff
path: root/dmx512/src/dmxout.c
diff options
context:
space:
mode:
Diffstat (limited to 'dmx512/src/dmxout.c')
-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)
{