Safe Haskell | Safe-Inferred |
---|
The FFI-using part of Cmd.Play. It uses the FFI because the play monitor wants to directly call to the UI to update the playback indicator, which is much more efficient than going through the whole Ui.Diff thing.
But that means Cmd.Play would import FFI-using modules, which causes
a problem for ghci, and, since I want the Cmd.Play functions to be
available there, for the REPL as well. So I engage in a hack: the play cmd
returns a special Cmd.Play
value which contains the arguments for the
play monitor thread. The responder treats it as a Done but will call
play
with the given args.
Actually since I have *Stub modules now I think this hack is no longer needed. But I'll leave it in place for now since it doesn't seem to be hurting anything and it's nice to divide play into low and high level.
Synopsis
- cmd_play_msg :: Fltk.Channel -> Msg.Msg -> Cmd.CmdT IO Cmd.Status
- play :: Fltk.Channel -> Ui.State -> Transport.Info -> Cmd.PlayArgs -> IO Transport.PlayControl
Documentation
cmd_play_msg :: Fltk.Channel -> Msg.Msg -> Cmd.CmdT IO Cmd.Status Source #
Respond to msgs about derivation and playing status.
play :: Fltk.Channel -> Ui.State -> Transport.Info -> Cmd.PlayArgs -> IO Transport.PlayControl Source #
This actually kicks off a MIDI play thread, and if an inverse tempo function is given, a play monitor thread.