Skip to content

five-on-it / apps/client/src/audio/sound-player

apps/client/src/audio/sound-player ​

Plays the sound bank (bank.ts) on Howler: a sound by its id, once (SoundPlayer.play, a variation picked at random and never the same twice running, its pitch varied in its range, fainter with the distance and panned to where it is when it carries a range, never more of it at once than its voices) or as a loop the caller starts, steers and stops (SoundPlayer.loop: the engine, the rain). Every sound plays on its bus at the settings' volume for it (the music's for music, the effects' for the rest) under the master volume, which is Howler's own. Held while the game is paused, but the ui bus, whose cues the pause menu plays. A sound's source is its files when it has any (audio-files.ts), else its placeholder; each is loaded the first time it is played or preloaded.

Interfaces ​

Type Aliases ​

Functions ​