Stop all sound when stopping time

This commit is contained in:
2022-10-28 14:36:16 +01:00
parent d3233c7daa
commit 0150655c6d
16 changed files with 99 additions and 96 deletions
+4
View File
@@ -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.