Clear the loading queues before changing the file

This commit is contained in:
Paul Ferrand 2020-10-23 14:44:20 +02:00
parent b04f6a73b9
commit 49b66c2ba9

View file

@ -194,6 +194,9 @@ void sfz::Synth::clear()
{
const std::lock_guard<SpinMutex> disableCallback { callbackGuard };
// Clear the background queues before removing everyone
resources.filePool.waitForBackgroundLoading();
for (auto& voice : voices)
voice->reset();
for (auto& list : noteActivationLists)