From 3164a6c502e657bbbbb6158e7ba4c8f162cbce7a Mon Sep 17 00:00:00 2001 From: KIRA Ryouta Date: Wed, 14 Feb 2024 16:08:14 +0900 Subject: [PATCH] Improved status check in garbage collection process --- src/sfizz/FilePool.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/sfizz/FilePool.cpp b/src/sfizz/FilePool.cpp index c8096178..a37d22b6 100644 --- a/src/sfizz/FilePool.cpp +++ b/src/sfizz/FilePool.cpp @@ -683,8 +683,13 @@ void sfz::FilePool::triggerGarbageCollection() noexcept return status == FileData::Status::Preloaded || status == FileData::Status::FullLoaded; } - if (status != FileData::Status::Done) - return false; + switch (status) { + case FileData::Status::Invalid: + case FileData::Status::Streaming: + return false; + default: + break; + } if (data.readerCount != 0) return false;