From 644b678880ddcb21e9eeaf83439cfc7870865a21 Mon Sep 17 00:00:00 2001 From: Paul Ferrand Date: Mon, 30 Dec 2019 00:30:39 +0100 Subject: [PATCH] Removed the assertion since it may create issues when missing notes --- src/sfizz/MidiState.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sfizz/MidiState.cpp b/src/sfizz/MidiState.cpp index 1db8585d..8d4c3644 100644 --- a/src/sfizz/MidiState.cpp +++ b/src/sfizz/MidiState.cpp @@ -25,8 +25,8 @@ void sfz::MidiState::noteOffEvent(int noteNumber, uint8_t velocity [[maybe_unuse ASSERT(velocity >= 0 && velocity <= 127); if (noteNumber >= 0 && noteNumber < 128) { - activeNotes--; - ASSERT(activeNotes >= 0); + if (activeNotes > 0) + activeNotes--; } }