aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorcbdev <cb@cbcdn.com>2017-07-11 16:01:32 +0200
committercbdev <cb@cbcdn.com>2017-07-11 16:01:32 +0200
commit269c317ea599e1192a4194c66389484714971254 (patch)
tree2284f10b00d90135b584fe63abad5f4df243b6e9
parentabc1700eee53bd6dfd3e1d70736256bb02c0a115 (diff)
downloadmidimonster-269c317ea599e1192a4194c66389484714971254.tar.gz
midimonster-269c317ea599e1192a4194c66389484714971254.tar.bz2
midimonster-269c317ea599e1192a4194c66389484714971254.zip
Fix bug in OSC backend
-rw-r--r--TODO3
-rw-r--r--osc.c3
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)){