Skip to content

Commit

Permalink
explicit match
Browse files Browse the repository at this point in the history
  • Loading branch information
yaxu committed Jan 9, 2019
1 parent 096be19 commit 5c399fb
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/Sound/Tidal/Stream.hs
Original file line number Diff line number Diff line change
Expand Up @@ -196,11 +196,11 @@ send :: O.Transport t => OSCTarget -> Double -> t -> (Double, O.Message) -> IO (
send target latency u (time, m)
| oTimestamp target == BundleStamp = O.sendBundle u $ O.Bundle (time + latency) [m]
| oTimestamp target == MessageStamp = O.sendMessage u m
| otherwise = do _ <- forkIO $ do now <- O.time
threadDelay $ floor $ ((time+latency) - now) * 1000000
O.sendMessage u m
return ()
| oTimestamp target == NoStamp = do _ <- forkIO $ do now <- O.time
threadDelay $ floor $ ((time+latency) - now) * 1000000
O.sendMessage u m
return ()

sched :: T.Tempo -> Rational -> Double
sched tempo c = ((fromRational $ c - (T.atCycle tempo)) / T.cps tempo) + (T.atTime tempo)

Expand Down

0 comments on commit 5c399fb

Please sign in to comment.