sfizz icon indicating copy to clipboard operation
sfizz copied to clipboard

Crash fix: if `Voice::startVoice()` fails, clean up immediately

Open geraintluff opened this issue 2 months ago • 0 comments

If a Voice fails to start, it's left as State::cleanMeUp. However, the main render loop assumes voices are either State::idle or State::playing, and only checks voice.toBeCleanedUp() at the end.

There are various ways to fix it (e.g. checking at the top of the main render loop!) but resetting Voices immediately after a failed start also makes them available again to respond to the next incoming trigger.

geraintluff avatar Oct 09 '25 21:10 geraintluff