Build-Depends:
MonadCatchIO-transformers == 0.2.*,
base == 4.2.*,
+ base-unicode-symbols == 0.2.*,
bindings-EsounD == 0.1.*,
network == 2.2.*,
regions == 0.7.*,
Extensions:
EmptyDataDecls
KindSignatures
+ ScopedTypeVariables
UnicodeSyntax
GHC-Options:
import Bindings.EsounD
import Control.Monad.CatchIO
import Control.Monad.Trans.Region
+import Data.Bits
import Data.Int
import Network
+import Prelude.Unicode
import System.IO.SaferFileHandles
class Frame fr where
return pl { plHandle = h' }
-- | Open an ESD handle for playing a stream.
-openPlayer ∷ ( Frame fr
- , Channels ch
- , MonadCatchIO pr
- )
+openPlayer ∷ ∀ fr ch s pr.
+ ( Frame fr
+ , Channels ch
+ , MonadCatchIO pr
+ )
⇒ Int -- ^ sample rate for the stream.
→ HostName -- ^ host to connect to.
→ Maybe String -- ^ name used to identify this stream to
-- ESD (if any).
→ RegionT s pr (Player fr ch (RegionT s pr))
openPlayer rate host name
- = return Player {
- plRate = rate
- , plHandle = error "FIXME: not implemented"
- }
+ = do let fmt = frameFmt ((⊥) ∷ fr) .&.
+ channelFmt ((⊥) ∷ ch) .&.
+ c'ESD_STREAM .&.
+ c'ESD_PLAY
+ return Player {
+ plRate = rate
+ , plHandle = error "FIXME: not implemented"
+ }