Skip to content

apps/client/src/audio ​

The sound bank and the radio (Sound and the radio). The bank's content (sounds.json, the files that replace placeholders, the radio's stations) is beside the client in apps/client/audio/ (its README).

FileWhatTested by
bank.tsThe sound events of sounds.json (SoundId, typed from the JSON), how each is mixed, its files found by name (weapon.pistol.shot → sfx/weapon/pistol/shot.ogg), what is wrongbank.test
placeholders.tsThe synth:<name> placeholders, the sounds synthesized in renderer/audio-synth.tsbank.test
sound-player.tsPlays the bank on Howler: variations at random, pitch ranges, voices, distance and pan, buses at the settings' volumes, loops, held while the game is paused (but the cues)sound-player.test
audio-files.tsThe files under apps/client/audio/ found when the page is built (Vite's globs): the bank's, the stations' and their manifests(Vite)
radio-stations.tsThe stations from their folders' station.json: files, urls or a stream, titles, logos, what is wrongradio-stations.test
radio-timeline.tsEvery station live on the wall clock: what plays at a moment, a seeded shuffle per roundradio-timeline.test
radio.tsThe radio: each car's station, auto-on, earbuds on foot, two-wheelers without, the next item, skips and no signal, held with the gameradio.test, e2e
radio-deck.tsPlays the radio's items and streams on <audio> elements (no CORS needed), from their live moment, after the first gesturee2e (E2E-575 to E2E-582)