From 8baa876a865544b07e7dced6ff5c7ac70c8fef55 Mon Sep 17 00:00:00 2001 From: Persune Date: Thu, 26 Dec 2024 06:09:37 +0800 Subject: [PATCH] Avoid writing volume commands in DPCM channel Fixes #331. --- Source/PatternCompiler.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Source/PatternCompiler.cpp b/Source/PatternCompiler.cpp index 0128ea89..a436a3da 100644 --- a/Source/PatternCompiler.cpp +++ b/Source/PatternCompiler.cpp @@ -302,6 +302,8 @@ void CPatternCompiler::CompileData(int Track, int Pattern, int Channel) } else { DPCMInst = ChanNote.Instrument; + Volume = MAX_VOLUME; + // double check if DPCMInst is a valid instrument index if (!(DPCMInst >= 0 && DPCMInst < MAX_INSTRUMENTS)) { #ifdef _DEBUG