aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author3gg <3gg@shellblade.net>2025-01-01 18:46:07 -0800
committer3gg <3gg@shellblade.net>2025-01-01 18:46:07 -0800
commit78f83dbce31c69add3a0586c426591ac163ba093 (patch)
treebaa70fb4eb8010bb0e72cb91dcfbd2eb0a86adb1
parentacc954c9ac3a18e2d48e52839a7dc751597dfb15 (diff)
Fix sound system destruction.
-rw-r--r--Spear/Sound/Sound.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/Spear/Sound/Sound.hs b/Spear/Sound/Sound.hs
index 832ffb8..887cf97 100644
--- a/Spear/Sound/Sound.hs
+++ b/Spear/Sound/Sound.hs
@@ -41,8 +41,10 @@ initSoundSystem = return newSoundState
41destroySoundSystem :: Game SoundState () 41destroySoundSystem :: Game SoundState ()
42destroySoundSystem = do 42destroySoundSystem = do
43 state <- get 43 state <- get
44 mapM_ release' (toList $ buffers state) 44 -- The order here matters; sources before buffers since buffers are attached
45 -- to sources.
45 mapM_ release' (toList $ sources state) 46 mapM_ release' (toList $ sources state)
47 mapM_ release' (toList $ buffers state)
46 put newSoundState 48 put newSoundState
47 49
48-- | Load an audio file. 50-- | Load an audio file.