From a15f1755d07830757d56bb86e0b253c0ccf651d8 Mon Sep 17 00:00:00 2001 From: cam900 Date: Mon, 6 Feb 2023 12:39:42 +0900 Subject: [PATCH] Fix per-channel OSC (again) --- src/engine/platform/es5506.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/engine/platform/es5506.cpp b/src/engine/platform/es5506.cpp index 2eb07d19..ead11a2e 100644 --- a/src/engine/platform/es5506.cpp +++ b/src/engine/platform/es5506.cpp @@ -114,6 +114,9 @@ const char** DivPlatformES5506::getRegisterSheet() { void DivPlatformES5506::acquire(short** buf, size_t len) { for (size_t h=0; hchanMax; i--) { + oscBuf[i]->data[oscBuf[i]->needle++]=0; + } // convert 32 bit access to 8 bit host interface while (!hostIntf32.empty()) { QueuedHostIntf w=hostIntf32.front(); @@ -136,7 +139,7 @@ void DivPlatformES5506::acquire(short** buf, size_t len) { buf[(o<<1)|0][h]=es5506.lout(o); buf[(o<<1)|1][h]=es5506.rout(o); } - for (int i=0; i<32; i++) { + for (int i=chanMax; i>=0; i--) { oscBuf[i]->data[oscBuf[i]->needle++]=(short)(chan[i].oscOut&0xffff); } }