diff options
| -rw-r--r-- | package.yaml | 2 | ||||
| -rw-r--r-- | trivmix.cabal | 2 | ||||
| -rw-r--r-- | trivmix.nix | 2 | ||||
| -rw-r--r-- | trivmix/Trivmix.hs | 4 |
4 files changed, 6 insertions, 4 deletions
diff --git a/package.yaml b/package.yaml index 123fe83..44132e5 100644 --- a/package.yaml +++ b/package.yaml | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | name: trivmix | 1 | name: trivmix |
| 2 | version: 4.0.0 | 2 | version: 4.0.1 |
| 3 | license: PublicDomain | 3 | license: PublicDomain |
| 4 | license-file: LICENSE | 4 | license-file: LICENSE |
| 5 | author: Gregor Kleen <aethoago@141.li> | 5 | author: Gregor Kleen <aethoago@141.li> |
diff --git a/trivmix.cabal b/trivmix.cabal index 962edd6..44b9ea0 100644 --- a/trivmix.cabal +++ b/trivmix.cabal | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | name: trivmix | 1 | name: trivmix |
| 2 | version: 4.0.0 | 2 | version: 4.0.1 |
| 3 | category: Sound | 3 | category: Sound |
| 4 | author: Gregor Kleen <aethoago@141.li> | 4 | author: Gregor Kleen <aethoago@141.li> |
| 5 | license: PublicDomain | 5 | license: PublicDomain |
diff --git a/trivmix.nix b/trivmix.nix index bcc7037..da38e26 100644 --- a/trivmix.nix +++ b/trivmix.nix | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | }: | 5 | }: |
| 6 | mkDerivation { | 6 | mkDerivation { |
| 7 | pname = "trivmix"; | 7 | pname = "trivmix"; |
| 8 | version = "4.0.0"; | 8 | version = "4.0.1"; |
| 9 | src = ./.; | 9 | src = ./.; |
| 10 | isLibrary = true; | 10 | isLibrary = true; |
| 11 | isExecutable = true; | 11 | isExecutable = true; |
diff --git a/trivmix/Trivmix.hs b/trivmix/Trivmix.hs index 5cddf6f..7c18965 100644 --- a/trivmix/Trivmix.hs +++ b/trivmix/Trivmix.hs | |||
| @@ -194,7 +194,9 @@ trivmix Options{..} = do | |||
| 194 | mulBalance (bToScientific -> b) x = either error id $ asScientific (*) (Lin . either error id $ refine b) x | 194 | mulBalance (bToScientific -> b) x = either error id $ asScientific (*) (Lin . either error id $ refine b) x |
| 195 | newLevel <- mulBalance <$> readMVar balance <*> readMVar level | 195 | newLevel <- mulBalance <$> readMVar balance <*> readMVar level |
| 196 | currentLevel <- (\(CFloat f) -> Lin . either error id . refine $ realToFrac f) <$> readMVar level' | 196 | currentLevel <- (\(CFloat f) -> Lin . either error id . refine $ realToFrac f) <$> readMVar level' |
| 197 | mapM_ (\x -> (swapMVar level' $! toRealFloat . unrefine . toLin $ linInt' x currentLevel newLevel) >> threadDelay delay) (takeWhile (<= 1) $ iterate (+ recip frames) 0) | 197 | case compare currentLevel newLevel of |
| 198 | EQ -> threadDelay . round $ interval * 1e6 | ||
| 199 | _ -> mapM_ (\x -> (swapMVar level' $! toRealFloat . unrefine . toLin $ linInt' x currentLevel newLevel) >> threadDelay delay) (takeWhile (<= 1) $ iterate (+ recip frames) 0) | ||
| 198 | notifyReady | 200 | notifyReady |
| 199 | forever $ threadDelay (round $ watchdogInterval * 1e6) >> notifyWatchdog | 201 | forever $ threadDelay (round $ watchdogInterval * 1e6) >> notifyWatchdog |
| 200 | 202 | ||
