Stop all sound when stopping time
This commit is contained in:
@@ -12,6 +12,7 @@ module Sound (
|
||||
-- * Simple (One-Shot) Playback
|
||||
playSoundQueue
|
||||
, playPositionalSoundQueue
|
||||
, stopAllSounds
|
||||
-- * Complex Playback
|
||||
, playSoundAndUpdate
|
||||
-- * Volume Control
|
||||
@@ -120,6 +121,9 @@ cleanupHalted s = do
|
||||
then return s
|
||||
else mzero
|
||||
|
||||
stopAllSounds :: IO ()
|
||||
stopAllSounds = Mix.halt Mix.AllChannels
|
||||
|
||||
-----------------------------------------------------------------
|
||||
{- | Play sounds from a list of indices.
|
||||
For each index, the corresponding sound starts playing if there is a free channel.
|
||||
|
||||
Reference in New Issue
Block a user