MCPcopy Create free account
hub / github.com/NVIDIA-RTX/Donut / LoadFromFileAsync

Method LoadFromFileAsync

src/engine/AudioCache.cpp:213–228  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

211}
212
213std::shared_ptr<AudioData const> AudioCache::LoadFromFileAsync(const std::filesystem::path & path, ThreadPool& threadPool)
214{
215 std::shared_ptr<AudioData const> audio;
216
217 if (findInCache(path, audio))
218 return audio;
219
220 threadPool.AddTask([this, &audio, path]()
221 {
222 if ((audio = loadAudioFile(path)))
223 {
224 sendAudioLoadedMessage(audio, path.generic_string().c_str());
225 }
226 });
227 return audio;
228}
229
230} // namespace donut::engine::audio

Callers

nothing calls this directly

Calls 1

AddTaskMethod · 0.80

Tested by

no test coverage detected