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
- withOpenClient :: String -> [Options] -> String -> (Client -> [Status] -> IO a) -> ([Status] -> IO a) -> IO a
- withOpenClientDefaultServer :: [Options] -> String -> (Client -> [Status] -> IO a) -> ([Status] -> IO a) -> IO a
- clientOpenWithDefaultServer :: String -> [Options] -> IO (Client, [Status])
- clientOpenWithServerName :: String -> [Options] -> String -> IO (Client, [Status])
- clientClose :: Client -> IO ()
- clientNameSize :: IO Int
- getClientName :: Client -> IO String
- internalClientNew :: String -> String -> String -> IO Int
- 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
- data Port
- data 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
- | NoStartServer
- | UseExactName
- | ServerName
- | LoadName
- | LoadInit
- data Client
- data Status
- = Failure
- | InvalidOption
- | NameNotUnique
- | ServerStarted
- | ServerFailed
- | ServerError
- | NoSuchClient
- | LoadFailure
- | InitFailure
- | ShmFailure
- | VersionError
- | BackendError
- | ClientZombie
- data PortID
- defaultAudioType :: String
- defaultMidiType :: String
- fromPThread :: PThread -> CULong
- type NFrames = CUInt
- data PThread
- type Time = CULLong
Documentation
:: String | server name |
-> [Options] | client options |
-> String | client name |
-> (Client -> [Status] -> IO a) | action to be run with the open client |
-> ([Status] -> IO a) | action to be run on error |
-> IO a |
Open a Jack client and run the supplied action, handling errors and closing the client
withOpenClientDefaultServerSource
:: [Options] | client options |
-> String | The client name |
-> (Client -> [Status] -> IO a) | action to be run with the open client |
-> ([Status] -> IO a) | action to be run at error |
-> IO a |
Open a Jack client on the default server and run the supplied action, handling errors and closing the client
clientOpenWithDefaultServer :: String -> [Options] -> IO (Client, [Status])Source
open an external client with the defailt server
clientOpenWithServerName :: String -> [Options] -> String -> IO (Client, [Status])Source
open an external client with the specified server
clientClose :: Client -> IO ()Source
getClientName :: Client -> IO StringSource
internalClientClose :: String -> IO ()Source
DEPRECATED. use internalClientLoad
deactivate :: Client -> IO IntSource
clientThreadId :: Client -> IO PThreadSource
isRealtime :: Client -> IO BoolSource
setProcessThread :: Client -> ThreadCallback -> Ptr () -> IO IntSource
setThreadInitCallback :: Client -> ThreadInitCallback -> Ptr () -> IO IntSource
setProcessCallback :: Client -> ProcessCallback -> Ptr () -> IO IntSource
setFreewheelCallback :: Client -> FreewheelCallback -> Ptr () -> IO IntSource
setBufferSizeCallback :: Client -> BufferSizeCallback -> Ptr () -> IO IntSource
setSampleRateCallback :: Client -> SampleRateCallback -> Ptr () -> IO IntSource
setPortConnectCallback :: Client -> PortConnectCallback -> Ptr () -> IO IntSource
setGraphOrderCallback :: Client -> GraphOrderCallback -> Ptr () -> IO IntSource
setXrunCallback :: Client -> XRunCallback -> Ptr () -> IO IntSource
getSampleRate :: Client -> IO CUIntSource
getBufferSize :: Client -> IO Word32Source
portGetBuffer :: Port -> Word32 -> IO (Ptr AudioSample)Source
portShortName :: Port -> IO StringSource
portConnected :: Port -> IO IntSource
portGetConnections :: Port -> IO [String]Source
jackPortGetLatency :: Port -> IO Word32Source
portMonitoringInput :: Port -> IO IntSource
type AudioSample = CFloatSource
fromPThread :: PThread -> CULongSource