feat: add audio system

This commit is contained in:
2026-10-23 22:07:52 +02:00
parent a3d3da4a67
commit 0b7cc38543
28 changed files with 7412 additions and 214 deletions
+16
View File
@@ -142,6 +142,22 @@ void AssetFS::Mount(std::string scheme, std::filesystem::path root) {
mounts.push_back(std::move(mount));
}
void AssetFS::ReloadManifest(std::string_view scheme) {
for (FSMount& mount : mounts) {
if (mount.scheme != scheme) {
continue;
}
const std::filesystem::path manifestPath = mount.root / "manifest.json";
std::error_code error;
mount.manifest.reset();
if (std::filesystem::is_regular_file(manifestPath, error)) {
mount.manifest = FS::LoadAssetManifest(manifestPath);
}
return;
}
throw std::runtime_error("asset mount not found: " + std::string{scheme});
}
std::vector<uint8_t> AssetFS::ReadBytes(std::string_view vpath) {
return ReadFile(GetFullPath(vpath));
}