-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | Bindings to the JACK Audio Connection Kit
--
-- Low level bindings to the JACK Audio Connection Kit (
-- http://jackaudio.org/ )
--
-- This package provides bindings to the functionality providet in the
-- jack.h include file and should be sufficient to write a fully
-- functional client
--
-- For now, please refer to the Jack documentation for a complete
-- description of the api.
--
-- http://jackaudio.org/files/docs/html/jack_8h.html
@package jack-bindings
@version 0.1
-- | Low level bindings to the JACK <jack.h> functionality
--
-- This is a faithfull representation of the C api. For now please refer
-- to the JACK api documentation for a complete description of the
-- functionality
--
-- http://jackaudio.org/files/docs/html/jack_8h.html
--
-- A somewhat safer interface can be found at Sound.Jack.JackMonad
module Sound.Jack.Bindings
-- | Open a Jack client and run the supplied action, handling errors and
-- closing the client
withOpenClient :: String -> [Options] -> String -> (Client -> [Status] -> IO a) -> ([Status] -> IO a) -> IO a
-- | Open a Jack client on the default server and run the supplied action,
-- handling errors and closing the client
withOpenClientDefaultServer :: [Options] -> String -> (Client -> [Status] -> IO a) -> ([Status] -> IO a) -> IO a
-- | open an external client with the defailt server
clientOpenWithDefaultServer :: String -> [Options] -> IO (Client, [Status])
-- | open an external client with the specified server
clientOpenWithServerName :: String -> [Options] -> String -> IO (Client, [Status])
clientClose :: Client -> IO ()
clientNameSize :: IO (Int)
getClientName :: Client -> IO (String)
-- | DEPRECATED. Use internalClientOpen
internalClientNew :: String -> String -> String -> IO (Int)
-- | DEPRECATED. use internalClientLoad
internalClientClose :: String -> IO ()
activate :: Client -> IO (Int)
deactivate :: Client -> IO (Int)
clientThreadId :: Client -> IO (PThread)
isRealtime :: Client -> IO (Bool)
cycleWait :: Client -> IO (Word32)
cycleSignal :: Client -> Int -> IO ()
setProcessThread :: Client -> ThreadCallback -> Ptr () -> IO Int
setThreadInitCallback :: Client -> ThreadInitCallback -> Ptr () -> IO Int
setProcessCallback :: Client -> ProcessCallback -> Ptr () -> IO Int
setFreewheelCallback :: Client -> FreewheelCallback -> Ptr () -> IO Int
setBufferSizeCallback :: Client -> BufferSizeCallback -> Ptr () -> IO Int
setSampleRateCallback :: Client -> SampleRateCallback -> Ptr () -> IO Int
setClientRegistrationCallback :: Client -> ClientRegistrationCallback -> Ptr () -> IO Int
setPortRegistrationCallback :: Client -> PortRegistrationCallback -> Ptr () -> IO Int
setPortConnectCallback :: Client -> PortConnectCallback -> Ptr () -> IO Int
setGraphOrderCallback :: Client -> GraphOrderCallback -> Ptr () -> IO Int
setXrunCallback :: Client -> XRunCallback -> Ptr () -> IO Int
setFreewheel :: Client -> Bool -> IO (Int)
setBufferSize :: Client -> Word32 -> IO (Int)
getSampleRate :: Client -> IO (CUInt)
getBufferSize :: Client -> IO (Word32)
engineTakeoverTimebase :: Client -> IO (Int)
cpuLoad :: Client -> IO (Float)
portRegister :: Client -> String -> String -> [PortFlags] -> Int -> IO (Port)
portUnregister :: Client -> Port -> IO (Int)
portGetBuffer :: Port -> Word32 -> IO (Ptr AudioSample)
portName :: Port -> IO (String)
portShortName :: Port -> IO (String)
portFlags :: Port -> IO ([PortFlags])
portType :: Port -> IO (String)
portIsMine :: Client -> Port -> IO (Bool)
portConnected :: Port -> IO (Int)
portGetConnections :: Port -> IO ([String])
portGetAllConnections :: Client -> Port -> IO ([String])
jackPortGetLatency :: Port -> IO (Word32)
jackPortGetTotalLatency :: Client -> Port -> IO (Word32)
portSetLatency :: Port -> Word32 -> IO ()
recomputeTotalLatencies :: Client -> IO (Int)
portSetName :: Port -> String -> IO (Int)
portSetAlias :: Port -> String -> IO (Int)
portUnsetAlias :: Port -> String -> IO (Int)
portRequestMonitor :: Port -> Bool -> IO (Int)
portRequestMonitorByName :: Client -> String -> Bool -> IO (Int)
portEnsureMonitor :: Port -> Bool -> IO (Int)
portMonitoringInput :: Port -> IO (Int)
connect :: Client -> String -> String -> IO (Int)
disconnect :: Client -> String -> String -> IO (Int)
portDisconnect :: Client -> Port -> IO (Int)
portNameSize :: IO (Int)
portTypeSize :: IO (Int)
getPorts :: Client -> String -> String -> [PortFlags] -> IO ([String])
portByName :: Client -> String -> IO (Port)
portById :: Client -> PortID -> IO (Port)
framesSinceCycleStart :: Client -> IO (Word32)
frameTime :: Client -> IO (Word32)
framesToTime :: Client -> Word32 -> IO (Time)
timeToFrames :: Client -> Time -> IO (Word32)
getTime :: IO (Time)
-- | Opaque.
data Port
data PortFlags
PortIsInput :: PortFlags
PortIsOutput :: PortFlags
PortIsPhysical :: PortFlags
PortCanMonitor :: PortFlags
PortIsTerminal :: PortFlags
type AudioSample = CFloat
type BufferSizeCallback = CUInt -> Ptr () -> IO CInt
type ClientRegistrationCallback = Ptr CChar -> CInt -> Ptr () -> IO ()
type FreewheelCallback = CInt -> Ptr () -> IO ()
type GraphOrderCallback = Ptr () -> IO CInt
type PortConnectCallback = CUInt -> CUInt -> CInt -> Ptr () -> IO ()
type PortRegistrationCallback = CUInt -> CInt -> Ptr () -> IO ()
type ProcessCallback = CUInt -> Ptr () -> IO CInt
type SampleRateCallback = CUInt -> Ptr () -> IO CInt
type ThreadCallback = Ptr () -> IO (Ptr ())
type ThreadInitCallback = Ptr () -> IO ()
type XRunCallback = Ptr () -> IO CInt
data Options
NullOption :: Options
NoStartServer :: Options
UseExactName :: Options
ServerName :: Options
LoadName :: Options
LoadInit :: Options
-- | Opaque.
data Client
data Status
Failure :: Status
InvalidOption :: Status
NameNotUnique :: Status
ServerStarted :: Status
ServerFailed :: Status
ServerError :: Status
NoSuchClient :: Status
LoadFailure :: Status
InitFailure :: Status
ShmFailure :: Status
VersionError :: Status
BackendError :: Status
ClientZombie :: Status
-- | Opaque.
data PortID
defaultAudioType :: String
defaultMidiType :: String
fromPThread :: PThread -> (CULong)
type NFrames = CUInt
data PThread
type Time = CULLong
-- | A monadic interface to the JACK api. The client handle is hidden in a
-- Reader so you don't have to touch it.
--
-- For now please refer to the documentation of the C library found at
--
-- http://jackaudio.org/files/docs/html/jack_8h.html
--
-- for a complete description
--
-- Unlifted versions can be found in Sound.Jack.Bindings
module Sound.Jack.JackMonad
-- | create a new Client, install Exception handlers and run the supplied
-- action
--
-- Takes the server name, creation options, the name of the client , the
-- action to run and the action to run the client could not be created
runWithNewClient :: String -> [Options] -> String -> ([Status] -> JackAction a) -> ([Status] -> IO a) -> IO a
-- | create a new Client, install Exception handlers and run the supplied
-- action
--
-- Takes creation options, the name of the client, the action to run and
-- the action to run the client could not be created
runWithNewClientDefaultServer :: [Options] -> String -> ([Status] -> JackAction a) -> ([Status] -> IO a) -> IO a
-- | JackAction is a ReaderT Client over IO
--
-- Run it with runWithNewClient[DefaultServer]
data JackAction a
getClientName :: JackAction String
activate :: JackAction Int
deactivate :: JackAction Int
clientThreadId :: JackAction PThread
isRealtime :: JackAction Bool
cycleWait :: JackAction Word32
cycleSignal :: Int -> JackAction ()
setProcessThread :: ThreadCallback -> Ptr () -> JackAction Int
setThreadInitCallback :: ThreadInitCallback -> Ptr () -> JackAction Int
setProcessCallback :: ProcessCallback -> Ptr () -> JackAction Int
setFreewheelCallback :: FreewheelCallback -> Ptr () -> JackAction Int
setBufferSizeCallback :: BufferSizeCallback -> Ptr () -> JackAction Int
setSampleRateCallback :: SampleRateCallback -> Ptr () -> JackAction Int
setClientRegistrationCallback :: ClientRegistrationCallback -> Ptr () -> JackAction Int
setPortRegistrationCallback :: PortRegistrationCallback -> Ptr () -> JackAction Int
setPortConnectCallback :: PortConnectCallback -> Ptr () -> JackAction Int
setGraphOrderCallback :: GraphOrderCallback -> Ptr () -> JackAction Int
setXrunCallback :: XRunCallback -> Ptr () -> JackAction Int
setFreewheel :: Bool -> JackAction Int
setBufferSize :: Word32 -> JackAction Int
getSampleRate :: JackAction CUInt
getBufferSize :: JackAction Word32
engineTakeoverTimebase :: JackAction Int
cpuLoad :: JackAction Float
portRegister :: String -> String -> [PortFlags] -> Int -> JackAction Port
portUnregister :: Port -> JackAction Int
portIsMine :: Port -> JackAction Bool
portGetAllConnections :: Port -> JackAction [String]
jackPortGetTotalLatency :: Port -> JackAction Word32
recomputeTotalLatencies :: JackAction Int
portRequestMonitorByName :: String -> Bool -> JackAction Int
connect :: String -> String -> JackAction Int
disconnect :: String -> String -> JackAction Int
portDisconnect :: Port -> JackAction Int
getPorts :: String -> String -> [PortFlags] -> JackAction [String]
portByName :: String -> JackAction Port
portById :: PortID -> JackAction Port
framesSinceCycleStart :: JackAction Word32
frameTime :: JackAction Word32
framesToTime :: Word32 -> JackAction Time
timeToFrames :: Time -> JackAction Word32
-- | Read the client handle from the reader. You shouldn't need that.
unsafeAskClient :: JackAction Client
-- | close the Client. RunWithNewClient should normally do that for you.
unsafeClientClose :: JackAction ()
clientNameSize :: JackAction Int
internalClientNew :: String -> String -> String -> JackAction Int
internalClientClose :: String -> JackAction ()
portGetBuffer :: Port -> Word32 -> JackAction (Ptr AudioSample)
portName :: Port -> JackAction String
portShortName :: Port -> JackAction String
portFlags :: Port -> JackAction [PortFlags]
portType :: Port -> JackAction String
portConnected :: Port -> JackAction Int
portGetConnections :: Port -> JackAction [String]
jackPortGetLatency :: Port -> JackAction Word32
portSetLatency :: Port -> Word32 -> JackAction ()
portSetName :: Port -> String -> JackAction Int
portSetAlias :: Port -> String -> JackAction Int
portUnsetAlias :: Port -> String -> JackAction Int
portRequestMonitor :: Port -> Bool -> JackAction Int
portEnsureMonitor :: Port -> Bool -> JackAction Int
portMonitoringInput :: Port -> JackAction Int
portNameSize :: JackAction Int
portTypeSize :: JackAction Int
getTime :: JackAction Time
-- | Opaque.
data Port
data PortFlags
PortIsInput :: PortFlags
PortIsOutput :: PortFlags
PortIsPhysical :: PortFlags
PortCanMonitor :: PortFlags
PortIsTerminal :: PortFlags
type AudioSample = CFloat
type BufferSizeCallback = CUInt -> Ptr () -> IO CInt
type ClientRegistrationCallback = Ptr CChar -> CInt -> Ptr () -> IO ()
type FreewheelCallback = CInt -> Ptr () -> IO ()
type GraphOrderCallback = Ptr () -> IO CInt
type PortConnectCallback = CUInt -> CUInt -> CInt -> Ptr () -> IO ()
type PortRegistrationCallback = CUInt -> CInt -> Ptr () -> IO ()
type ProcessCallback = CUInt -> Ptr () -> IO CInt
type SampleRateCallback = CUInt -> Ptr () -> IO CInt
type ThreadCallback = Ptr () -> IO (Ptr ())
type ThreadInitCallback = Ptr () -> IO ()
type XRunCallback = Ptr () -> IO CInt
data Options
NullOption :: Options
NoStartServer :: Options
UseExactName :: Options
ServerName :: Options
LoadName :: Options
LoadInit :: Options
-- | Opaque.
data Client
data Status
Failure :: Status
InvalidOption :: Status
NameNotUnique :: Status
ServerStarted :: Status
ServerFailed :: Status
ServerError :: Status
NoSuchClient :: Status
LoadFailure :: Status
InitFailure :: Status
ShmFailure :: Status
VersionError :: Status
BackendError :: Status
ClientZombie :: Status
-- | Opaque.
data PortID
defaultAudioType :: String
defaultMidiType :: String
fromPThread :: PThread -> (CULong)
type NFrames = CUInt
data PThread
type Time = CULLong
instance Monad JackAction
instance Functor JackAction
instance MonadIO JackAction
module Sound.Jack