Skip to content

five-on-it / apps/client/src/renderer/audio

apps/client/src/renderer/audio ​

The game's sounds, on the sound bank (audio/bank.ts, played by audio/sound-player.ts): an engine loop whose pitch and volume follow the car, a tyre scrub that plays only while the rear is sliding (a drift), louder the more it slides (at a boat's helm, its outboard, its diesel or its oars instead, vehicle.boat.*), a siren's wail while one is heard (the player's own, or the nearest other car's, fainter with the distance), an ice-cream van's jingle while one crawls or serves near, a burning car's crackle, louder the nearer the fire, a water cannon's jet hissing while one sprays near, the police drone's buzz and their helicopter's rotor while one flies near (the caller says how loud), the rain's hiss and the wind as hard as they go, a boom for every explosion heard (by its size and distance) and a deeper one for thunder, a horn on request, a dog's bark (fainter with the distance), any other sound of the bank on request (AudioSystem.play: the shots, the hits) and a music loop toggled with U or the overlay button, quiet while the radio plays, at the settings' volumes (the whole, the music, the effects); held while the game is paused. Which file each sound plays (or which placeholder) is the bank's business. Browsers only play sound after a user gesture; Howler unlocks itself on the first key press or click.

Interfaces ​

Functions ​