| 177 | } |
| 178 | |
| 179 | bool AudioCache::findInCache(const std::filesystem::path & path, std::shared_ptr<AudioData const> & result) |
| 180 | { |
| 181 | result.reset(); |
| 182 | |
| 183 | std::lock_guard<std::mutex> guard(m_LoadedDataMutex); |
| 184 | |
| 185 | result = m_LoadedAudioData[path.generic_string()]; |
| 186 | if (result) |
| 187 | return true; |
| 188 | |
| 189 | result = std::make_shared<AudioData const>(); |
| 190 | m_LoadedAudioData[path.generic_string()] = result; |
| 191 | return false; |
| 192 | } |
| 193 | |
| 194 | void AudioCache::sendAudioLoadedMessage(std::shared_ptr<AudioData const> audio, char const * path) |
| 195 | { |