Remove fade out, temporary fix to sound bug

This commit is contained in:
jgk
2021-04-14 14:04:31 +02:00
parent 353f27c576
commit 6119276d45
2 changed files with 8 additions and 8 deletions
Binary file not shown.
+8 -8
View File
@@ -106,16 +106,17 @@ decrementTimer s = case _soundTime s of
& soundStatus .~ FadingOut)
Nothing -> return s
applyPosition = return
--applyPosition = return
--applyPosition :: Sound -> IO Sound
--applyPosition s = case _soundPos s of
-- Nothing -> return s
-- Just (a,d) -> Mix.effectPosition (fromJust $ _soundChannel s) a d
-- >> return (s & soundPos .~ Nothing)
applyPosition :: Sound -> IO Sound
applyPosition s = case _soundPos s of
Nothing -> return s
Just (a,d) -> Mix.effectPosition (fromJust $ _soundChannel s) a d
>> return (s & soundPos .~ Nothing)
fadeOutMaybe :: Maybe Mix.Channel -> Int -> IO ()
fadeOutMaybe (Just x) fadeT = Mix.fadeOut (fromIntegral fadeT + 1) x
--fadeOutMaybe (Just x) fadeT = Mix.fadeOut (fromIntegral fadeT + 1) x
fadeOutMaybe (Just x) fadeT = Mix.halt x
fadeOutMaybe _ _ = return ()
cleanupHalted :: Sound -> MaybeT IO Sound
@@ -161,7 +162,6 @@ setChannelPos a i = do
Behind the scenes, scales a float [0,1] to an Int [0..128].
-}
setSoundVolume :: Float -> IO ()
--setSoundVolume x = Mix.setVolume (round (x * 128)) Mix.AllChannels
setSoundVolume x = Mix.setVolume (round (x * 128)) Mix.AllChannels
{- | Set the music volume.