jack.client
alias BufferSizeDelegate ClientRegistrationDelegate FreewheelDelegate GraphOrderDelegate InfoShutdownDelegate LatencyDelegate PortConnectDelegate PortRegistrationDelegate PortRenameDelegate ProcessDelegate ProcessThreadDelegate SampleRateDelegate ShutdownDelegate SyncDelegate ThreadInitDelegate TimebaseDelegate XRunDelegate
class Client
Types 18
aliasThreadInitDelegate = void delegate()
High-level object-oriented JACK client.
Uses D delegates for callbacks and provides a more ergonomic API over the raw C bindings.
aliasProcessDelegate = int delegate(NFrames nframes)
aliasShutdownDelegate = void delegate()
aliasInfoShutdownDelegate = void delegate(JackStatus code, string reason)
aliasFreewheelDelegate = void delegate(bool starting)
aliasBufferSizeDelegate = int delegate(NFrames nframes)
aliasSampleRateDelegate = int delegate(NFrames nframes)
aliasClientRegistrationDelegate = void delegate(string name, bool registered)
aliasPortRegistrationDelegate = void delegate(PortId port, bool registered)
aliasPortConnectDelegate = void delegate(PortId a, PortId b, bool connected)
aliasPortRenameDelegate = void delegate(PortId port, string oldName, string newName)
aliasGraphOrderDelegate = int delegate()
aliasXRunDelegate = int delegate()
aliasLatencyDelegate = void delegate(JackLatencyCallbackMode mode)
aliasSyncDelegate = int delegate(JackTransportState state, Position * pos)
aliasTimebaseDelegate = void delegate(JackTransportState state, NFrames nframes,
Position * pos, bool newPos)
aliasProcessThreadDelegate = void * delegate()
classClient
Fields
jack_client_t * handle_ThreadInitDelegate threadInitDg_ProcessDelegate processDg_ShutdownDelegate shutdownDg_InfoShutdownDelegate infoShutdownDg_FreewheelDelegate freewheelDg_BufferSizeDelegate bufferSizeDg_SampleRateDelegate sampleRateDg_ClientRegistrationDelegate clientRegistrationDg_PortRegistrationDelegate portRegistrationDg_PortConnectDelegate portConnectDg_PortRenameDelegate portRenameDg_GraphOrderDelegate graphOrderDg_XRunDelegate xrunDg_LatencyDelegate latencyDg_SyncDelegate syncDg_TimebaseDelegate timebaseDg_ProcessThreadDelegate processThreadDg_Methods
int getMaxNameLength() static @nogc nothrowGet maximum JACK client name length. Real-time safe. Returns: Maximum JACK client name lengthvoid open(string clientName, JackOptions options = JackOptions.NullOption, string serverName = null)Open a JACK client. Not real-time safe. Params: clientName = Client name to register with the JACK server options = Option flags (defaults to JackOptions.NullOption) serverName = Name of the server...void close()Close JACK client. Not real-time safe. Throws: JackException on failurevoid activate()Activate JACK client. Not real-time safe. Throws: JackException on failurevoid deactivate()Deactivate JACK client. Not real-time safe. Throws: JackException on failurebool setBufferSize(NFrames nframes) @nogc nothrowSet buffer size Params: nframes = Buffer size in frames Returns: true on success, false otherwisevoid freewheel(bool on) @propertySet freewheel state. Not real-time safe. Params: on = true to enable freewheeling (JACK server processes data as fast as possible, for faster than realtime rendering), false otherwise Throws: JackE...void syncTimeout(JackTime timeout) @propertySet timeout value for slow-sync clients. Not real-time safe. Params: timeout = The timeout in microseconds Throws: JackException on failureNFrames cycleWait() @nogc nothrowWait until the JACK client should process data. Used with the non-callback API. Returns: Number of frames to processvoid cycleSignal(int status = 0) @nogc nothrowSignal next clients in the JACK call graph. Used with the non-callback API. Params: status = A status value, if non-zero calling thread should exit (defaults to 0)Port registerPort(string portName, string portType, JackPortFlags flags, ulong bufferSize = 0)Register a port Params: portName = Name of the port portType = The type of port, such as JACK_DEFAULT_AUDIO_TYPE or JACK_DEFAULT_MIDI_TYPE flags = Port flags bufferSize = Must be non-zero if the po...Port registerAudioOut(string name)Register an audio output port (convenience method) Params: name = The port name Returns: The new audio output Port Throws: JackException on failurePort registerAudioIn(string name)Register an audio input port (convenience method) Params: name = The port name Returns: The new audio input Port Throws: JackException on failurePort registerMidiOut(string name)Register a MIDI output port (convenience method) Params: name = The port name Returns: The new MIDI output Port Throws: JackException on failurePort registerMidiIn(string name)Register a MIDI input port (convenience method) Params: name = The port name Returns: The new MIDI input Port Throws: JackException on failurevoid unregisterPort(Port port)Unregister a port Params: port = The port Throws: JackException on failurebool portIsMine(Port port) @nogc nothrowCheck if port belongs to this client Params: port = The port Returns: true if the port belongs to this clientvoid connect(string src, string dst)Connect the named ports Params: src = The source port name dest = The destination port name Throws: JackException on failurevoid disconnect(string src, string dst)Disconnect the named ports Params: src = The source port name dest = The destination port name Throws: JackException on failurevoid disconnectPort(Port port)Disconnect a port Params: port = The port to disconnect Throws: JackException on failurestring[] getAllConnections(Port port)Get all connections for a port Differs from Port.getConnections() in that this should not be called from a callback and the caller does not need to be the owner of the port. Params: port = The port...string[] getPorts(string namePattern = null, string typePattern = null, JackPortFlags flags = cast(JackPortFlags) 0)Get ports for this client Params: namePattern = Regular expression for matching ports by name. A null value will match any name (default) typePattern = Regular expression for matching ports by type...Port portByName(const(char) * name) @nogc nothrowGet a Port by name. Real-time safe. Params: name = The port name (zero terminated string) Returns: The Port which will be a null valued port (isNull()) if not foundPort portByName(string name)Get a Port by name. NOT real-time safe (may allocate). Params: name = The port name Returns: The Port which will be a null valued port (isNull()) if not foundPort portById(PortId id) @nogc nothrowGet a Port by ID. Real-time safe. Params: id = The ID of the port Returns: The Port which will be a null valued port (isNull()) if not foundsize_t portTypeBufferSize(const(char) * portType) @nogc nothrowGet the buffer size of a port of a given type. Real-time safe. Should only be called in a buffer size callback. Params: portType = Should be passed a zero terminated C string of port type Returns: ...size_t portTypeBufferSize(string portType)Get the buffer size of a port of a given type. Not real-time safe (may allocate). Should only be called in a buffer size callback. Params: portType = Port type name Returns: Size of the port buffer...void requestMonitorByPortName(string portName, bool on)Request to monitor a port by name. NOT real-time safe (may allocate and throw). Params: portName = The port name on = true to enable monitoring, false to disable it Throws: JackException on failurebool recomputeTotalLatencies() @nogc nothrowRequest latency recompute. Can be called by a client after updating a port latencies. Real-time safe. Returns: true on success, false otherwisebool transportLocate(NFrames frame) @nogc nothrowReposition the transport to a new frame number. Real-time safe. Params: frame = The frame number of the new position Returns: true on success, false otherwiseJackTransportState transportQuery(Position * pos = null) @nogc nothrowQuery the transport state and position. Real-time safe. Params: pos = Pointer to store position information to or null to retrieve position info Returns: The state of the transportbool transportReposition(const(Position) * pos) @nogc nothrowRequest transport reposition. Real-time safe. Params: pos = The new position Returns: true on success, false otherwiseNFrames currentTransportFrame() @nogc nothrowGet estimate of transport frame. Returns: Current transport framebool releaseTimebase() @nogc nothrowCalled by the timebase master to release itself as master. Real-time safe. Returns: true on success, false otherwiseNFrames framesSinceCycleStart() @nogc nothrowGet the number of estimated frames that have passed since the JACK server started this cycle. Real-time safe. Returns: Estimated frame countNFrames frameTime() @nogc nothrowGet estimated time in frames. Intended for other threads (not called by process callbacks). Returns: Estimated time in framesNFrames lastFrameTime() @nogc nothrowGet the last frame time for the current cycle. This is intended to be called from process callbacks. Real-time safe. It will return the same time for a given callback cycle.JackTime frameToTime(NFrames frames) @nogc nothrowConvert frames to time. Real-time safe. Params: frames = Frame count Returns: Estimated time in microsecondsNFrames timeToFrames(JackTime time) @nogc nothrowConvert time to frames. Real-time safe. Params: time = The time in microseconds Returns: Estimated frame countvoid threadInitCallback(ShutdownDelegate dg) @propertySet thread init callback which is called once after the thread is created which will call the other callbacks. Notification callback, does not need to be real-time safe. Throws: JackException on fa...void processCallback(ProcessDelegate dg) @propertySet process callback. Should be real-time safe. No memory allocation or other system calls should be performed in the delegate callback. Throws: JackException on failurevoid shutdownCallback(ShutdownDelegate dg) @propertySet shutdown callback. Notification callback, does not need to be real-time safe.void infoShutdownCallback(InfoShutdownDelegate dg) @propertySet info shutdown callback. Notification callback, does not need to be real-time safe.void freewheelCallback(FreewheelDelegate dg) @propertySet freewheel mode changed callback. Notification callback, does not need to be real-time safe. Throws: JackException on failurevoid bufferSizeCallback(BufferSizeDelegate dg) @propertySet buffer size changed callback. Notification callback, does not need to be real-time safe. Throws: JackException on failurevoid sampleRateCallback(SampleRateDelegate dg) @propertySet sample rate changed callback. Notification callback, does not need to be real-time safe. Throws: JackException on failurevoid clientRegistrationCallback(ClientRegistrationDelegate dg) @propertySet client registration callback. Notification callback, does not need to be real-time safe. Throws: JackException on failurevoid portRegistrationCallback(PortRegistrationDelegate dg) @propertySet port registration callback. Notification callback, does not need to be real-time safe. Throws: JackException on failurevoid portConnectCallback(PortConnectDelegate dg) @propertySet port connect/disconnect callback. Notification callback, does not need to be real-time safe. Throws: JackException on failurevoid portRenameCallback(PortRenameDelegate dg) @propertySet port rename callback. Notification callback, does not need to be real-time safe. Throws: JackException on failurevoid graphOrderCallback(GraphOrderDelegate dg) @propertySet graph order callback. Notification callback, does not need to be real-time safe. Throws: JackException on failurevoid xrunCallback(XRunDelegate dg) @propertySet xrun (overrun/underrun) callback. Notification callback, does not need to be real-time safe. Throws: JackException on failurevoid latencyCallback(LatencyDelegate dg) @propertySet latency update callback. Notification callback, does not need to be real-time safe. Throws: JackException on failurevoid syncCallback(SyncDelegate dg) @propertySet a slow-sync client callback. Notification callback, does not need to be real-time safe. Throws: JackException on failurevoid timebaseCallback(bool conditional, TimebaseDelegate dg) @propertySet a timebase master callback. Notification callback, does not need to be real-time safe. Params: conditional = true for a conditional request (fails if there is already a master) dg = The callbac...void processThreadCallback(ProcessThreadDelegate dg) @propertySet the non-callback API thread delegate. Used when not using the usual process callback with processCallback(). Used in conjunction with cycleWait() and cycleSignal(). Should be real-time safe. No...void threadInitTrampoline(void * arg) staticint processTrampoline(jack_nframes_t nframes, void * arg) staticvoid shutdownTrampoline(void * arg) staticvoid infoShutdownTrampoline(jack_status_t code, const(char) * reason, void * arg) staticvoid freewheelTrampoline(int starting, void * arg) staticint bufferSizeTrampoline(jack_nframes_t nframes, void * arg) staticint sampleRateTrampoline(jack_nframes_t nframes, void * arg) staticvoid clientRegistrationTrampoline(const(char) * name, int register_, void * arg) staticvoid portRegistrationTrampoline(jack_port_id_t port, int register_, void * arg) staticvoid portConnectTrampoline(jack_port_id_t a, jack_port_id_t b, int connect, void * arg) staticvoid portRenameTrampoline(jack_port_id_t port, const(char) * old_name, const(char) * new_name,
void * arg) staticint graphOrderTrampoline(void * arg) staticint xrunTrampoline(void * arg) staticvoid latencyTrampoline(jack_latency_callback_mode_t mode, void * arg) staticint syncTrampoline(jack_transport_state_t state, jack_position_t * pos, void * arg) staticvoid timebaseTrampoline(jack_transport_state_t state, jack_nframes_t nframes,
jack_position_t * pos, int new_pos, void * arg) staticvoid * processThreadTrampoline(void * arg) staticConstructors
this()Destructors