From 47293decd34813e84ee4cbd1069df364594abb54 Mon Sep 17 00:00:00 2001 From: tildearrow Date: Sat, 28 Jan 2023 18:10:25 -0500 Subject: [PATCH] OPL: fix missing ADPCM channel in per-chan osc --- src/engine/platform/opl.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/engine/platform/opl.cpp b/src/engine/platform/opl.cpp index afaba9f94..ff57f9afb 100644 --- a/src/engine/platform/opl.cpp +++ b/src/engine/platform/opl.cpp @@ -1555,7 +1555,11 @@ DivMacroInt* DivPlatformOPL::getChanMacroInt(int ch) { } DivDispatchOscBuffer* DivPlatformOPL::getOscBuffer(int ch) { - if (ch>=totalChans) return NULL; + if (oplType==759) { + if (ch>=totalChans+1) return NULL; + } else { + if (ch>=totalChans) return NULL; + } if (oplType==3 && ch<12) { if (chan[ch&(~1)].fourOp) { if (ch&1) {