Don't start loading jobs if hint_ram_based is set
This commit is contained in:
parent
be7c526495
commit
1c77b96d2f
1 changed files with 11 additions and 8 deletions
|
|
@ -434,15 +434,18 @@ sfz::FileDataHolder sfz::FilePool::getFilePromise(const std::shared_ptr<FileId>&
|
|||
DBG("[sfizz] File not found in the preloaded files: " << fileId->filename());
|
||||
return {};
|
||||
}
|
||||
QueuedFileData queuedData { fileId, &preloaded->second };
|
||||
if (!filesToLoad->try_push(queuedData)) {
|
||||
DBG("[sfizz] Could not enqueue the file to load for " << fileId << " (queue capacity " << filesToLoad->capacity() << ")");
|
||||
return {};
|
||||
}
|
||||
|
||||
std::error_code ec;
|
||||
dispatchBarrier.post(ec);
|
||||
ASSERT(!ec);
|
||||
if (!loadInRam) {
|
||||
QueuedFileData queuedData { fileId, &preloaded->second };
|
||||
if (!filesToLoad->try_push(queuedData)) {
|
||||
DBG("[sfizz] Could not enqueue the file to load for " << fileId << " (queue capacity " << filesToLoad->capacity() << ")");
|
||||
return {};
|
||||
}
|
||||
|
||||
std::error_code ec;
|
||||
dispatchBarrier.post(ec);
|
||||
ASSERT(!ec);
|
||||
}
|
||||
|
||||
return { &preloaded->second };
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue