From cf83c636845951fe3d36f6dd069c8b86f329162d Mon Sep 17 00:00:00 2001 From: probonopd Date: Sat, 3 May 2025 16:54:17 +0200 Subject: [PATCH] Don't hardcode number [ci skip] --- src/minidexed.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/minidexed.cpp b/src/minidexed.cpp index e8d1171..09c7ea7 100644 --- a/src/minidexed.cpp +++ b/src/minidexed.cpp @@ -1982,7 +1982,7 @@ void CMiniDexed::loadVoiceParameters(const uint8_t* data, uint8_t nTG) tg_mixer->pan(physicalTG, mapfloat(pan, 0, 127, 0.0f, 1.0f)); } // Silence any unused auxiliary TGs (to prevent leftover sound/crackle) - for (unsigned v = unisonVoices; v < 4; ++v) { // 4 is the max unison voices + for (unsigned v = unisonVoices; v < maxUnisonVoices; ++v) { // maxUnisonVoices is the max unison voices unsigned physicalTG = getPhysicalTG(nTG, v, maxUnisonVoices); if (physicalTG >= m_nToneGenerators) continue; m_pTG[physicalTG]->notesOff();