five-on-it / apps/client/src/audio/bank
apps/client/src/audio/bank
The sound bank: every sound the game plays is an event with an id (weapon.pistol.shot), declared once in apps/client/audio/sounds.json with how it is mixed (its bus, volume, pitch variation, loop, how many at once, how far it carries) and the placeholder it plays while it has no file. The code plays events by id (SoundId, so a misspelt one fails the type check) and never names a file. A sound's files are found by its id: the dots are folders under apps/client/audio/sfx/, so weapon.pistol.shot is sfx/weapon/pistol/shot.ogg, or shot.1.ogg, shot.2.ogg, … for variations played at random (soundFiles). bankIssues says what is wrong with the bank: a field out of range, a placeholder that is not one, a file that matches no sound (a typo would otherwise be ignored).