fix: harden S4 audio verification

This commit is contained in:
goose
2026-10-01 09:02:23 -04:00
parent 0615f5b89d
commit 4e356ee7b8
6 changed files with 102 additions and 6 deletions
+1 -1
View File
@@ -33,7 +33,7 @@ Audio is optional presentation. Its absence, unknown requests, missing folders,
└── death/
```
Admitted file extensions are `.mp3`, `.ogg`, `.oga`, `.wav`, `.flac`, `.m4a`, and `.opus`. Godot-native playback is attempted for compatible `.wav`, `.ogg`/`.oga`/`.opus`, and `.mp3` files; other admitted extensions are discovered but silently skipped if no native loader is available. The game selects `exploration` at startup, changes to `combat` for a combat result, and dispatches SFX for player attacks, enemy attacks, and death.
Admitted file extensions are `.mp3`, `.ogg`, `.oga`, `.wav`, `.flac`, `.m4a`, and `.opus`. Before invoking an external Godot loader, `AudioLibrary` fails closed unless a `.wav` has a `RIFF`/`WAVE` signature, an `.ogg`/`.oga`/`.opus` has `OggS`, or an `.mp3` has `ID3` or a valid MPEG sync word. `.flac` and `.m4a` remain silent because this library has no native external loader for them. Thus extension-only or malformed external files are never handed to `load_from_file`. The game selects `exploration` at startup, changes to `combat` for a combat result, and dispatches SFX for player attacks, enemy attacks, and death.
Example: