21 #ifndef __JackGraphManager__
22 #define __JackGraphManager__
24 #include "JackShmMem.h"
26 #include "JackConstants.h"
27 #include "JackConnectionManager.h"
28 #include "JackAtomicState.h"
29 #include "JackPlatformPlug.h"
30 #include "JackSystemDeps.h"
45 unsigned int fPortMax;
49 void AssertPort(jack_port_id_t port_index);
50 jack_port_id_t AllocatePortAux(
int refnum,
const char* port_name,
const char* port_type, JackPortFlags flags);
52 void GetPortsAux(
const char** matching_ports,
const char* port_name_pattern,
const char* type_name_pattern,
unsigned long flags);
53 jack_default_audio_sample_t* GetBuffer(jack_port_id_t port_index);
55 jack_nframes_t ComputeTotalLatencyAux(jack_port_id_t port_index, jack_port_id_t src_port_index,
JackConnectionManager* manager,
int hop_count);
56 void RecalculateLatencyAux(jack_port_id_t port_index, jack_latency_callback_mode_t mode);
64 void SetBufferSize(jack_nframes_t buffer_size);
67 jack_port_id_t AllocatePort(
int refnum,
const char* port_name,
const char* port_type, JackPortFlags flags, jack_nframes_t buffer_size);
68 int ReleasePort(
int refnum, jack_port_id_t port_index);
69 void GetInputPorts(
int refnum, jack_int_t* res);
70 void GetOutputPorts(
int refnum, jack_int_t* res);
71 void RemoveAllPorts(
int refnum);
72 void DisconnectAllPorts(
int refnum);
74 JackPort* GetPort(jack_port_id_t index);
75 jack_port_id_t GetPort(
const char* name);
77 int ComputeTotalLatency(jack_port_id_t port_index);
78 int ComputeTotalLatencies();
79 void RecalculateLatency(jack_port_id_t port_index, jack_latency_callback_mode_t mode);
81 int RequestMonitor(jack_port_id_t port_index,
bool onoff);
84 int Connect(jack_port_id_t src_index, jack_port_id_t dst_index);
85 int Disconnect(jack_port_id_t src_index, jack_port_id_t dst_index);
86 int IsConnected(jack_port_id_t port_src, jack_port_id_t port_dst);
89 int GetConnectionsNum(jack_port_id_t port_index)
95 const char** GetConnections(jack_port_id_t port_index);
96 void GetConnections(jack_port_id_t port_index, jack_int_t* connections);
97 const char** GetPorts(
const char* port_name_pattern,
const char* type_name_pattern,
unsigned long flags);
99 int GetTwoPorts(
const char* src,
const char* dst, jack_port_id_t* src_index, jack_port_id_t* dst_index);
100 int CheckPorts(jack_port_id_t port_src, jack_port_id_t port_dst);
102 void DisconnectAllInput(jack_port_id_t port_index);
103 void DisconnectAllOutput(jack_port_id_t port_index);
104 int DisconnectAll(jack_port_id_t port_index);
106 bool IsDirectConnection(
int ref1,
int ref2);
107 void DirectConnect(
int ref1,
int ref2);
108 void DirectDisconnect(
int ref1,
int ref2);
110 void Activate(
int refnum);
111 void Deactivate(
int refnum);
113 int GetInputRefNum(jack_port_id_t port_index);
114 int GetOutputRefNum(jack_port_id_t port_index);
117 void* GetBuffer(jack_port_id_t port_index, jack_nframes_t frames);
120 void RunCurrentGraph();
122 bool IsFinishedGraph();
124 void InitRefNum(
int refnum);
127 void TopologicalSort(std::vector<jack_int_t>& sorted);
131 return &fClientTiming[refnum];
140 } POST_PACKED_STRUCTURE;
Inter process synchronization using using Mach semaphore.
Graph manager: contains the connection manager and the port array.
A class to handle two states (switching from one to the other) in a lock-free manner.
For client timing measurements.
The base class for shared memory management.
jack_int_t Connections(jack_port_id_t port_index) const
Get the connection number of a given port.
Client control possibly in shared memory.