Disable the callback before killing the voices

This commit is contained in:
Paul Fd 2020-03-16 00:32:31 +01:00
parent e068ec77e5
commit 4d3ea7da30

View file

@ -965,6 +965,11 @@ void sfz::Synth::disableLogging() noexcept
void sfz::Synth::allSoundOff() noexcept
{
AtomicDisabler callbackDisabler{ canEnterCallback };
while (inCallback) {
std::this_thread::sleep_for(std::chrono::milliseconds(1));
}
for (auto &voice: voices)
voice->reset();
for (auto& effectBus: effectBuses)