diff --git a/data/music/firstCompo.mid b/data/music/firstCompo.mid index ee4fd8a8f..42411e4c5 100644 Binary files a/data/music/firstCompo.mid and b/data/music/firstCompo.mid differ diff --git a/src/Sound.hs b/src/Sound.hs index 1d160966d..fdadf5886 100644 --- a/src/Sound.hs +++ b/src/Sound.hs @@ -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.