diff options
| -rw-r--r-- | Spear/Sound/Sound.hs | 4 |
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 | |||
| 41 | destroySoundSystem :: Game SoundState () | 41 | destroySoundSystem :: Game SoundState () |
| 42 | destroySoundSystem = do | 42 | destroySoundSystem = 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. |
