From 1ffbfe17d458733773ea141579f9a9a8f3e39b4e Mon Sep 17 00:00:00 2001 From: tildearrow Date: Fri, 13 May 2022 17:40:05 -0500 Subject: [PATCH] Y8950/YMU759: ADPCM muting --- src/engine/platform/opl.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/engine/platform/opl.cpp b/src/engine/platform/opl.cpp index 5ba5342f6..fe8fd4397 100644 --- a/src/engine/platform/opl.cpp +++ b/src/engine/platform/opl.cpp @@ -285,9 +285,13 @@ void DivPlatformOPL::acquire_nuked(short* bufL, short* bufR, size_t start, size_ aOut.clear(); adpcmB->output<2>(aOut,0); - os[0]+=aOut.data[0]; - os[1]+=aOut.data[0]; - oscBuf[adpcmChan]->data[oscBuf[adpcmChan]->needle++]+=aOut.data[0]; + if (!isMuted[adpcmChan]) { + os[0]+=aOut.data[0]; + os[1]+=aOut.data[0]; + oscBuf[adpcmChan]->data[oscBuf[adpcmChan]->needle++]+=aOut.data[0]; + } else { + oscBuf[adpcmChan]->data[oscBuf[adpcmChan]->needle++]=0; + } } for (int i=0; i