1 -- | Type-safe bindings to EsounD with monadic regions.
8 import Control.Monad.CatchIO
9 import Control.Monad.Trans.Region
11 import System.IO.SaferFileHandles
17 data Recorder frame channels
18 data Filter frame channels
22 -- ^ An ESD handle for playing a stream.
23 data Player frame channels (r ∷ * → *)
26 , plHandle ∷ RegionalFileHandle WriteMode r
29 instance Dup (Player frame channels) where
31 = do h' ← dup (plHandle pl)
32 return pl { plHandle = h' }
34 -- ^ Open an ESD handle for playing a stream.
35 openPlayer ∷ MonadCatchIO pr
36 ⇒ Int -- ^ sample rate for the stream.
37 → HostName -- ^ host to connect to.
38 → Maybe String -- ^ name used to identify this stream to
40 → RegionT s pr (Player frame channels (RegionT s pr))
41 openPlayer rate host name
44 , plHandle = error "FIXME: not implemented"