From fd61e0e9f8ccafc55b0d0e25e34101cac6343cd2 Mon Sep 17 00:00:00 2001 From: tildearrow Date: Mon, 20 Jun 2022 18:48:10 -0500 Subject: [PATCH] ZX beeper: per-"channel" osc there's only one --- src/engine/platform/zxbeeper.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/engine/platform/zxbeeper.cpp b/src/engine/platform/zxbeeper.cpp index 34265f8a0..524d3c117 100644 --- a/src/engine/platform/zxbeeper.cpp +++ b/src/engine/platform/zxbeeper.cpp @@ -59,6 +59,7 @@ void DivPlatformZXBeeper::acquire(short* bufL, short* bufR, size_t start, size_t } o=sampleOut; bufL[h]=o?16384:0; + oscBuf[0]->data[oscBuf[0]->needle++]=o?16384:-16384; continue; } @@ -76,6 +77,7 @@ void DivPlatformZXBeeper::acquire(short* bufL, short* bufR, size_t start, size_t if (++curChan>=6) curChan=0; bufL[h]=o?16384:0; + oscBuf[0]->data[oscBuf[0]->needle++]=o?16384:-16384; } } @@ -256,7 +258,7 @@ DivMacroInt* DivPlatformZXBeeper::getChanMacroInt(int ch) { } DivDispatchOscBuffer* DivPlatformZXBeeper::getOscBuffer(int ch) { - return oscBuf[ch]; + return (ch<1)?oscBuf[ch]:NULL; } unsigned char* DivPlatformZXBeeper::getRegisterPool() {