From 5ef9d6e9960a044d5ee876ce21d575ce07986dda Mon Sep 17 00:00:00 2001 From: Paul Ferrand Date: Sun, 29 Mar 2020 00:49:55 +0100 Subject: [PATCH] the handleGroupOpcode logic was flawed --- src/sfizz/Synth.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/sfizz/Synth.cpp b/src/sfizz/Synth.cpp index 34ef2472..1d85b6ac 100644 --- a/src/sfizz/Synth.cpp +++ b/src/sfizz/Synth.cpp @@ -180,7 +180,7 @@ void sfz::Synth::handleGlobalOpcodes(const std::vector& members) void sfz::Synth::handleGroupOpcodes(const std::vector& members) { absl::optional groupIdx; - absl::optional maxPolyphony; + unsigned maxPolyphony { config::maxVoices }; for (auto& member : members) { switch (member.lettersOnlyHash) { @@ -193,8 +193,8 @@ void sfz::Synth::handleGroupOpcodes(const std::vector& members) } } - if (groupIdx && maxPolyphony) - setGroupPolyphony(*groupIdx, *maxPolyphony); + if (groupIdx) + setGroupPolyphony(*groupIdx, maxPolyphony); } void sfz::Synth::handleControlOpcodes(const std::vector& members)