Continue tweaking sound
This commit is contained in:
+2
-1
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user