bouncing-crusher
Safe HaskellNone
LanguageHaskell2010

Sounds

Synopsis

Documentation

initSounds :: IO () #

Initialize SDL2-mixer (if sound is enabled)

closeSounds :: IO () #

Close SDL2-mixer (if sound is enabled)

playRequestedSounds :: MetaInfo -> IO MetaInfo #

Uses metaInfo's sounds/background music requests to play sounds, returns metaInfo with cleared requests.

playBackgroundMusic #

Arguments

:: Int

Background track index

-> IO () 

Play background music by index in backgroundTracks. If index is incorrect, print error and do nothing.

playAllSounds #

Arguments

:: SoundList

Initial soundList

-> [String]

List of requested sounds

-> IO SoundList

Updated soundList

Play sounds from soundList and sound request list. Returns updated soundList (with more sounds loaded).