FailWhaleBrigade / water-wars

Game in Haskell
Other
14 stars 4 forks source link

Sound should be adjustable #3

Open fendor opened 6 years ago

fendor commented 6 years ago

Adjustable Sound

The sound in the game should be adjustable. On a certain button, the volume should be turned down and vice versa.

Currenlty, the sound can be only disabled by a command line flag. If this flag is disabled, we abuse the C-Api of Proteaaudio and do not initialize the audio driver at all. This is obviously a hack, that should be changed.

Implementation suggestion

The implementation should be simple, just add to the WorldInfo a Double value for the volume and register that on button presses this volume should be increased or decreased. Moreover, the Sample of the main background music needs also to be saved in WorldInfo as well, so that the overall game sound can be adjusted as needed.