Remove fade out, temporary fix to sound bug
This commit is contained in:
Binary file not shown.
+8
-8
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user