module Sound.SC3.Server.State.Monad.Process (
withTransport
, withSynth
, withDefaultSynth
, module Sound.SC3.Server.Process
) where
import Data.Default (def)
import qualified Sound.SC3.Server.Connection as Conn
import Sound.SC3.Server.Process hiding (withSynth, withTransport)
import qualified Sound.SC3.Server.Process as Process
import Sound.SC3.Server.State.Monad (Server)
import qualified Sound.SC3.Server.State.Monad as Server
withTransport ::
ServerOptions
-> RTOptions
-> Maybe String
-> Server a
-> IO a
withTransport serverOptions rtOptions host action =
Process.withTransport
serverOptions
rtOptions
host
$ \t -> Conn.open t >>= Server.runServer action serverOptions
withSynth ::
ServerOptions
-> RTOptions
-> OutputHandler
-> Server a
-> IO a
withSynth serverOptions rtOptions outputHandler action =
Process.withSynth
serverOptions
rtOptions
outputHandler
$ \t -> Conn.open t >>= Server.runServer action serverOptions
withDefaultSynth :: Server a -> IO a
withDefaultSynth = withSynth def def def