From 269c317ea599e1192a4194c66389484714971254 Mon Sep 17 00:00:00 2001 From: cbdev Date: Tue, 11 Jul 2017 16:01:32 +0200 Subject: Fix bug in OSC backend --- TODO | 3 +-- osc.c | 3 ++- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/TODO b/TODO index 8176dd3..dd3022b 100644 --- a/TODO +++ b/TODO @@ -1,6 +1,5 @@ -Wide channels (DMX/MIDI) +MIDI NRPN Note source in channel value struct Optimize core channel search (store backend offset) -OSC backend transmit alignment fails on multifader Function generator Printing backend diff --git a/osc.c b/osc.c index 8945210..40bc01c 100644 --- a/osc.c +++ b/osc.c @@ -567,7 +567,6 @@ static int backend_set(instance* inst, size_t num, channel** c, channel_value* v return 0; } - memset(xmit_buf, 0, sizeof(xmit_buf)); osc_instance* data = (osc_instance*) inst->impl; if(!data->dest_len){ fprintf(stderr, "OSC instance %s does not have a destination, output is disabled (%zu channels)\n", inst->name, num); @@ -604,6 +603,8 @@ static int backend_set(instance* inst, size_t num, channel** c, channel_value* v //find all marked channels for(evt = 0; evt < data->channels; evt++){ + //zero output buffer + memset(xmit_buf, 0, sizeof(xmit_buf)); if(data->channel[evt].mark){ //determine minimum packet size if(osc_align((data->root ? strlen(data->root) : 0) + strlen(data->channel[evt].path) + 1) + osc_align(data->channel[evt].params + 2) >= sizeof(xmit_buf)){ -- cgit v1.2.3