Continue tweaking sound

This commit is contained in:
2021-09-12 20:33:33 +01:00
parent 51a85bd1ec
commit 72657294d1
89 changed files with 373 additions and 517 deletions
+2 -1
View File
@@ -55,7 +55,7 @@ playSoundAndUpdate sData oldSounds newSounds
mergeSound :: Sound -> Sound -> Sound
mergeSound oldS newS
| _soundChunkID newS == _soundChunkID oldS
| _soundChunkID newS == _soundChunkID oldS && _soundStatus newS == ToContinueStart
= newS & soundChannel .~ _soundChannel oldS
& soundStatus .~ _soundStatus oldS
| otherwise = newS & soundChannel .~ _soundChannel oldS
@@ -74,6 +74,7 @@ updateSound sd s =
initialisePlaying :: IM.IntMap Mix.Chunk -> Sound -> MaybeT IO Sound
initialisePlaying sd s = case _soundStatus s of
ToStart -> tryPlay sd s
ToContinueStart -> tryPlay sd s
JustStartedPlaying -> return $ s & soundStatus .~ Playing
_ -> return s