| 1109 | } |
| 1110 | |
| 1111 | bool Assets::doPost(AssetId const& id) const { |
| 1112 | shared_ptr<AssetData> assetData; |
| 1113 | try { |
| 1114 | assetData = m_assetsCache.get(id); |
| 1115 | if (id.type == AssetType::Audio) |
| 1116 | assetData = postProcessAudio(assetData); |
| 1117 | } catch (std::exception const& e) { |
| 1118 | Logger::error("Exception caught post-processing asset: {}, {}", id.path, outputException(e, true)); |
| 1119 | } catch (...) { |
| 1120 | Logger::error("Unknown exception caught post-processing asset: {}", id.path); |
| 1121 | } |
| 1122 | |
| 1123 | m_queue.remove(id); |
| 1124 | if (assetData) { |
| 1125 | assetData->needsPostProcessing = false; |
| 1126 | m_assetsCache[id] = assetData; |
| 1127 | freshen(assetData); |
| 1128 | m_assetsDone.broadcast(); |
| 1129 | } |
| 1130 | |
| 1131 | return true; |
| 1132 | } |
| 1133 | |
| 1134 | shared_ptr<Assets::AssetData> Assets::loadAsset(AssetId const& id) const { |
| 1135 | if (auto asset = m_assetsCache.value(id)) |
nothing calls this directly
no test coverage detected