From 8f4a19870a3ea97dc881de023cff9e7739d367af Mon Sep 17 00:00:00 2001 From: tildearrow Date: Sun, 7 Apr 2024 16:48:44 -0500 Subject: [PATCH] fix emu2413 output being inverted --- src/engine/platform/opll.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/engine/platform/opll.cpp b/src/engine/platform/opll.cpp index 5f90fec1a..537df42d7 100644 --- a/src/engine/platform/opll.cpp +++ b/src/engine/platform/opll.cpp @@ -102,7 +102,7 @@ void DivPlatformOPLL::acquire_emu(short** buf, size_t len) { OPLL_writeReg(fm_emu,w.addr,w.val); writes.pop(); } - os=OPLL_calc(fm_emu); + os=-OPLL_calc(fm_emu); os=os+(os<<1); if (os<-32768) os=-32768; if (os>32767) os=32767; @@ -111,9 +111,9 @@ void DivPlatformOPLL::acquire_emu(short** buf, size_t len) { for (int i=0; i<11; i++) { if (i>=6 && properDrums) { - oscBuf[i]->data[oscBuf[i]->needle++]=fm_emu->ch_out[i+3]<<3; + oscBuf[i]->data[oscBuf[i]->needle++]=(-fm_emu->ch_out[i+3])<<3; } else { - oscBuf[i]->data[oscBuf[i]->needle++]=fm_emu->ch_out[i]<<3; + oscBuf[i]->data[oscBuf[i]->needle++]=(-fm_emu->ch_out[i])<<3; } } }