Safe Haskell | Safe-Infered |
---|
The Jack module defines types and functions that allows you to use the JACK Audio Connection Kit.
- data Client
- newClient :: ThrowsStatus e => String -> String -> ExceptionalT e IO Client
- newClientDefault :: ThrowsStatus e => String -> ExceptionalT e IO Client
- disposeClient :: ThrowsErrno e => Client -> ExceptionalT e IO ()
- withClient :: ThrowsStatus e => String -> String -> (Client -> ExceptionalT e IO a) -> ExceptionalT e IO a
- withClientDefault :: ThrowsStatus e => String -> (Client -> ExceptionalT e IO a) -> ExceptionalT e IO a
- clientClose :: ThrowsErrno e => Client -> PortSet -> ExceptionalT e IO ()
- getPorts :: Client -> IO [String]
- activate :: ThrowsErrno e => Client -> ExceptionalT e IO ()
- deactivate :: ThrowsErrno e => Client -> ExceptionalT e IO ()
- withActivation :: ThrowsErrno e => Client -> ExceptionalT e IO () -> ExceptionalT e IO ()
- class PortType typ
- class Direction dir
- data Input
- data Output
- data Port typ dir
- newPort :: (PortType typ, Direction dir, ThrowsPortRegister e) => Client -> String -> ExceptionalT e IO (Port typ dir)
- disposePort :: (PortType typ, Direction dir, ThrowsErrno e) => Client -> Port typ dir -> ExceptionalT e IO ()
- withPort :: (PortType typ, Direction dir, ThrowsPortRegister e, ThrowsErrno e) => Client -> String -> (Port typ dir -> ExceptionalT e IO a) -> ExceptionalT e IO a
- data PortSet
- setOfPort :: (PortType typ, Direction dir) => Port typ dir -> PortSet
- setOfPorts :: (PortType typ, Direction dir) => [Port typ dir] -> PortSet
- type Process = NFrames -> Ptr CallbackArg -> IO Errno
- connect :: ThrowsErrno e => Client -> String -> String -> ExceptionalT e IO ()
- mkProcess :: Process -> IO (FunPtr Process)
- setProcess :: ThrowsErrno e => Client -> FunPtr Process -> ExceptionalT e IO ()
- data CallbackArg
- getSampleRate :: Client -> IO Int
- newtype NFrames = NFrames CUInt
- nframesIndices :: NFrames -> [NFrames]
- nframesBounds :: NFrames -> (NFrames, NFrames)
- quit :: MVar () -> Client -> PortSet -> IO ()
- waitForBreakAndClose :: Client -> PortSet -> IO ()
- waitForBreak :: IO ()
- handleExceptions :: ExceptionalT All IO () -> IO ()
general stuff
:: ThrowsStatus e | |
=> String | name of the JACK server |
-> String | name of the client |
-> ExceptionalT e IO Client |
Constructs a new Jack client.
:: ThrowsStatus e | |
=> String | name of the client |
-> ExceptionalT e IO Client |
Creates a new JACK client with the default server
disposeClient :: ThrowsErrno e => Client -> ExceptionalT e IO ()Source
:: ThrowsStatus e | |
=> String | name of the JACK server |
-> String | name of the client |
-> (Client -> ExceptionalT e IO a) | |
-> ExceptionalT e IO a |
Run a block of code with a newly allocated client. Do not use the client outside the block.
:: ThrowsStatus e | |
=> String | name of the client |
-> (Client -> ExceptionalT e IO a) | |
-> ExceptionalT e IO a |
clientClose :: ThrowsErrno e => Client -> PortSet -> ExceptionalT e IO ()Source
closes the given Jack client without causing any trouble (hopefully)
returns the names of all existing ports of the given Jack client
activate :: ThrowsErrno e => Client -> ExceptionalT e IO ()Source
activates the given Jack client
deactivate :: ThrowsErrno e => Client -> ExceptionalT e IO ()Source
withActivation :: ThrowsErrno e => Client -> ExceptionalT e IO () -> ExceptionalT e IO ()Source
:: (PortType typ, Direction dir, ThrowsPortRegister e) | |
=> Client | Jack client |
-> String | name of the input port |
-> ExceptionalT e IO (Port typ dir) |
Better use withPort
that also handles freeing the port.
disposePort :: (PortType typ, Direction dir, ThrowsErrno e) => Client -> Port typ dir -> ExceptionalT e IO ()Source
:: (PortType typ, Direction dir, ThrowsPortRegister e, ThrowsErrno e) | |
=> Client | Jack client |
-> String | name of the input port |
-> (Port typ dir -> ExceptionalT e IO a) | |
-> ExceptionalT e IO a |
Creates a new port for the given client and delete it after usage. The port manages audio or MIDI data in input or output direction depending on the Port type. Usually the required port type can be inferred from following actions that use that port.
Do not use the port outside the enclosed block.
A collection of mixed types of ports. It is mainly needed for freeing all allocated ports.
connect :: ThrowsErrno e => Client -> String -> String -> ExceptionalT e IO ()Source
setProcess :: ThrowsErrno e => Client -> FunPtr Process -> ExceptionalT e IO ()Source
data CallbackArg Source
getSampleRate :: Client -> IO IntSource
represents absolute frame time
nframesIndices :: NFrames -> [NFrames]Source
nframesBounds :: NFrames -> (NFrames, NFrames)Source
Exceptions
handleExceptions :: ExceptionalT All IO () -> IO ()Source