21 #include "JackClient.h"
22 #include "JackError.h"
23 #include "JackGraphManager.h"
24 #include "JackEngineControl.h"
25 #include "JackClientControl.h"
26 #include "JackGlobals.h"
28 #include "JackPortType.h"
38 typedef void (*print_function)(
const char*);
39 typedef void *(*thread_routine)(
void*);
51 jack_get_version_string();
53 jack_client_t * jack_client_new_aux(
const char* client_name,
54 jack_options_t options,
55 jack_status_t *status);
58 jack_options_t options,
59 jack_status_t *status, ...);
64 const char* load_name,
65 const char* load_init);
67 LIB_EXPORT
int jack_is_realtime(jack_client_t *client);
69 JackShutdownCallback shutdown_callback,
void *arg);
71 JackInfoShutdownCallback shutdown_callback,
void *arg);
73 JackProcessCallback process_callback,
75 LIB_EXPORT jack_nframes_t
jack_thread_wait(jack_client_t *client,
int status);
83 JackThreadInitCallback thread_init_callback,
86 JackFreewheelCallback freewheel_callback,
91 JackBufferSizeCallback bufsize_callback,
94 JackSampleRateCallback srate_callback,
97 JackClientRegistrationCallback
98 registration_callback,
void *arg);
100 JackPortRegistrationCallback
101 registration_callback,
void *arg);
103 JackPortConnectCallback
104 connect_callback,
void *arg);
106 JackPortRenameCallback
107 rename_callback,
void *arg);
109 JackGraphOrderCallback graph_callback,
112 JackXRunCallback xrun_callback,
void *arg);
113 LIB_EXPORT
int jack_set_latency_callback(jack_client_t *client,
114 JackLatencyCallback latency_callback,
void *arg);
119 const char* port_name,
120 const char* port_type,
122 unsigned long buffer_size);
130 LIB_EXPORT
int jack_port_is_mine(
const jack_client_t *,
const jack_port_t *port);
133 const char* port_name);
136 const jack_port_t *port);
137 LIB_EXPORT
int jack_port_tie(jack_port_t *src, jack_port_t *dst);
158 const char* port_name,
int onoff);
162 const char* source_port,
163 const char* destination_port);
165 const char* source_port,
166 const char* destination_port);
174 const char* port_name_pattern,
175 const char* type_name_pattern,
176 unsigned long flags);
177 LIB_EXPORT jack_port_t *
jack_port_by_name(jack_client_t *,
const char* port_name);
179 jack_port_id_t port_id);
183 LIB_EXPORT jack_nframes_t
jack_time_to_frames(
const jack_client_t *client, jack_time_t usecs);
184 LIB_EXPORT jack_time_t
jack_frames_to_time(
const jack_client_t *client, jack_nframes_t frames);
188 jack_nframes_t *current_frames,
189 jack_time_t *current_usecs,
190 jack_time_t *next_usecs,
191 float *period_usecs);
197 LIB_EXPORT
float jack_get_max_delayed_usecs(jack_client_t *client);
198 LIB_EXPORT
float jack_get_xrun_delayed_usecs(jack_client_t *client);
199 LIB_EXPORT
void jack_reset_max_delayed_usecs(jack_client_t *client);
203 JackSyncCallback sync_callback,
206 jack_time_t timeout);
209 JackTimebaseCallback timebase_callback,
212 jack_nframes_t frame);
229 jack_native_thread_t *thread,
232 thread_routine routine,
241 LIB_EXPORT
char * jack_get_internal_client_name(jack_client_t *client,
242 jack_intclient_t intclient);
243 LIB_EXPORT jack_intclient_t jack_internal_client_handle(jack_client_t *client,
244 const char* client_name,
245 jack_status_t *status);
246 LIB_EXPORT jack_intclient_t jack_internal_client_load(jack_client_t *client,
247 const char* client_name,
248 jack_options_t options,
249 jack_status_t *status, ...);
251 LIB_EXPORT jack_status_t jack_internal_client_unload(jack_client_t *client,
252 jack_intclient_t intclient);
253 LIB_EXPORT
void jack_free(
void* ptr);
270 static inline bool CheckPort(jack_port_id_t port_index)
272 return (port_index > 0 && port_index < PORT_NUM_MAX);
275 static inline bool CheckBufferSize(jack_nframes_t buffer_size)
277 return (buffer_size >= 1 && buffer_size <= BUFFER_SIZE_MAX);
280 static inline void WaitGraphChange()
287 if (jack_tls_get(JackGlobals::fRealTimeThread) == NULL) {
292 if (manager->IsPendingChange()) {
294 JackSleep(
int(control->fPeriodUsecs * 1.1f));
311 JackGlobals::CheckContext(
"jack_client_new");
314 assert(JackGlobals::fOpenMutex);
315 JackGlobals::fOpenMutex->Lock();
317 int options = JackUseExactName;
318 if (getenv(
"JACK_START_SERVER") == NULL) {
319 options |= JackNoStartServer;
321 jack_client_t* res = jack_client_new_aux(client_name, (jack_options_t)options, NULL);
322 JackGlobals::fOpenMutex->Unlock();
324 }
catch (std::bad_alloc& e) {
335 JackGlobals::CheckContext(
"jack_port_get_buffer");
337 uintptr_t port_aux = (uintptr_t)port;
338 jack_port_id_t myport = (jack_port_id_t)port_aux;
339 if (!CheckPort(myport)) {
340 jack_error(
"jack_port_get_buffer called with an incorrect port %ld", myport);
344 return (manager ? manager->GetBuffer(myport, frames) : NULL);
350 JackGlobals::CheckContext(
"jack_port_name");
352 uintptr_t port_aux = (uintptr_t)port;
353 jack_port_id_t myport = (jack_port_id_t)port_aux;
354 if (!CheckPort(myport)) {
355 jack_error(
"jack_port_name called with an incorrect port %ld", myport);
359 return (manager ? manager->GetPort(myport)->GetName() : NULL);
365 JackGlobals::CheckContext(
"jack_port_short_name");
367 uintptr_t port_aux = (uintptr_t)port;
368 jack_port_id_t myport = (jack_port_id_t)port_aux;
369 if (!CheckPort(myport)) {
370 jack_error(
"jack_port_short_name called with an incorrect port %ld", myport);
374 return (manager ? manager->GetPort(myport)->GetShortName() : NULL);
380 JackGlobals::CheckContext(
"jack_port_flags");
382 uintptr_t port_aux = (uintptr_t)port;
383 jack_port_id_t myport = (jack_port_id_t)port_aux;
384 if (!CheckPort(myport)) {
385 jack_error(
"jack_port_flags called with an incorrect port %ld", myport);
389 return (manager ? manager->GetPort(myport)->GetFlags() : -1);
395 JackGlobals::CheckContext(
"jack_port_type");
397 uintptr_t port_aux = (uintptr_t)port;
398 jack_port_id_t myport = (jack_port_id_t)port_aux;
399 if (!CheckPort(myport)) {
400 jack_error(
"jack_port_flags called an incorrect port %ld", myport);
404 return (manager ? manager->GetPort(myport)->GetType() : NULL);
410 JackGlobals::CheckContext(
"jack_port_type_id");
412 uintptr_t port_aux = (uintptr_t)port;
413 jack_port_id_t myport = (jack_port_id_t)port_aux;
414 if (!CheckPort(myport)) {
415 jack_error(
"jack_port_type_id called an incorrect port %ld", myport);
419 return (manager ? GetPortTypeId(manager->GetPort(myport)->GetType()) : 0);
425 JackGlobals::CheckContext(
"jack_port_connected");
427 uintptr_t port_aux = (uintptr_t)port;
428 jack_port_id_t myport = (jack_port_id_t)port_aux;
429 if (!CheckPort(myport)) {
430 jack_error(
"jack_port_connected called with an incorrect port %ld", myport);
435 return (manager ? manager->GetConnectionsNum(myport) : -1);
441 JackGlobals::CheckContext(
"jack_port_connected_to");
443 uintptr_t port_aux = (uintptr_t)port;
444 jack_port_id_t src = (jack_port_id_t)port_aux;
445 if (!CheckPort(src)) {
446 jack_error(
"jack_port_connected_to called with an incorrect port %ld", src);
448 }
else if (port_name == NULL) {
449 jack_error(
"jack_port_connected_to called with a NULL port name");
454 jack_port_id_t dst = (manager ? manager->GetPort(port_name) : NO_PORT);
455 if (dst == NO_PORT) {
456 jack_error(
"Unknown destination port port_name = %s", port_name);
459 return manager->IsConnected(src, dst);
466 JackGlobals::CheckContext(
"jack_port_tie");
468 uintptr_t src_aux = (uintptr_t)src;
469 jack_port_id_t mysrc = (jack_port_id_t)src_aux;
470 if (!CheckPort(mysrc)) {
471 jack_error(
"jack_port_tie called with a NULL src port");
474 uintptr_t dst_aux = (uintptr_t)dst;
475 jack_port_id_t mydst = (jack_port_id_t)dst_aux;
476 if (!CheckPort(mydst)) {
477 jack_error(
"jack_port_tie called with a NULL dst port");
481 if (manager && manager->GetPort(mysrc)->GetRefNum() != manager->GetPort(mydst)->GetRefNum()) {
482 jack_error(
"jack_port_tie called with ports not belonging to the same client");
485 return manager->GetPort(mydst)->Tie(mysrc);
491 JackGlobals::CheckContext(
"jack_port_untie");
493 uintptr_t port_aux = (uintptr_t)port;
494 jack_port_id_t myport = (jack_port_id_t)port_aux;
495 if (!CheckPort(myport)) {
496 jack_error(
"jack_port_untie called with an incorrect port %ld", myport);
500 return (manager ? manager->GetPort(myport)->UnTie() : -1);
506 JackGlobals::CheckContext(
"jack_port_get_latency");
508 uintptr_t port_aux = (uintptr_t)port;
509 jack_port_id_t myport = (jack_port_id_t)port_aux;
510 if (!CheckPort(myport)) {
511 jack_error(
"jack_port_get_latency called with an incorrect port %ld", myport);
516 return (manager ? manager->GetPort(myport)->GetLatency() : 0);
522 JackGlobals::CheckContext(
"jack_port_set_latency");
524 uintptr_t port_aux = (uintptr_t)port;
525 jack_port_id_t myport = (jack_port_id_t)port_aux;
526 if (!CheckPort(myport)) {
527 jack_error(
"jack_port_set_latency called with an incorrect port %ld", myport);
531 manager->GetPort(myport)->SetLatency(frames);
537 JackGlobals::CheckContext(
"jack_port_get_latency_range");
539 uintptr_t port_aux = (uintptr_t)port;
540 jack_port_id_t myport = (jack_port_id_t)port_aux;
541 if (!CheckPort(myport)) {
542 jack_error(
"jack_port_get_latency_range called with an incorrect port %ld", myport);
547 manager->GetPort(myport)->GetLatencyRange(mode, range);
553 JackGlobals::CheckContext(
"jack_port_set_latency_range");
555 uintptr_t port_aux = (uintptr_t)port;
556 jack_port_id_t myport = (jack_port_id_t)port_aux;
557 if (!CheckPort(myport)) {
558 jack_error(
"jack_port_set_latency_range called with an incorrect port %ld", myport);
563 manager->GetPort(myport)->SetLatencyRange(mode, range);
569 JackGlobals::CheckContext(
"jack_recompute_total_latency");
573 uintptr_t port_aux = (uintptr_t)port;
574 jack_port_id_t myport = (jack_port_id_t)port_aux;
575 if (client == NULL) {
576 jack_error(
"jack_recompute_total_latency called with a NULL client");
578 }
else if (!CheckPort(myport)) {
579 jack_error(
"jack_recompute_total_latency called with a NULL port");
584 return (manager ? manager->ComputeTotalLatency(myport) : -1);
590 JackGlobals::CheckContext(
"jack_recompute_total_latencies");
593 if (client == NULL) {
594 jack_error(
"jack_recompute_total_latencies called with a NULL client");
597 return client->ComputeTotalLatencies();
603 JackGlobals::CheckContext(
"jack_port_set_name");
605 uintptr_t port_aux = (uintptr_t)port;
606 jack_port_id_t myport = (jack_port_id_t)port_aux;
607 if (!CheckPort(myport)) {
608 jack_error(
"jack_port_set_name called with an incorrect port %ld", myport);
610 }
else if (name == NULL) {
611 jack_error(
"jack_port_set_name called with a NULL port name");
615 for (
int i = 0; i < CLIENT_NUM; i++) {
617 if ((client = JackGlobals::fClientTable[i])) {
621 return (client) ? client->PortRename(myport, name) : -1;
627 JackGlobals::CheckContext(
"jack_port_set_alias");
629 uintptr_t port_aux = (uintptr_t)port;
630 jack_port_id_t myport = (jack_port_id_t)port_aux;
631 if (!CheckPort(myport)) {
632 jack_error(
"jack_port_set_alias called with an incorrect port %ld", myport);
634 }
else if (name == NULL) {
635 jack_error(
"jack_port_set_alias called with a NULL port name");
639 return (manager ? manager->GetPort(myport)->SetAlias(name) : -1);
645 JackGlobals::CheckContext(
"jack_port_unset_alias");
647 uintptr_t port_aux = (uintptr_t)port;
648 jack_port_id_t myport = (jack_port_id_t)port_aux;
649 if (!CheckPort(myport)) {
650 jack_error(
"jack_port_unset_alias called with an incorrect port %ld", myport);
652 }
else if (name == NULL) {
653 jack_error(
"jack_port_unset_alias called with a NULL port name");
657 return (manager ? manager->GetPort(myport)->UnsetAlias(name) : -1);
663 JackGlobals::CheckContext(
"jack_port_get_aliases");
665 uintptr_t port_aux = (uintptr_t)port;
666 jack_port_id_t myport = (jack_port_id_t)port_aux;
667 if (!CheckPort(myport)) {
668 jack_error(
"jack_port_get_aliases called with an incorrect port %ld", myport);
672 return (manager ? manager->GetPort(myport)->GetAliases(aliases) : -1);
678 JackGlobals::CheckContext(
"jack_port_request_monitor");
680 uintptr_t port_aux = (uintptr_t)port;
681 jack_port_id_t myport = (jack_port_id_t)port_aux;
682 if (!CheckPort(myport)) {
683 jack_error(
"jack_port_request_monitor called with an incorrect port %ld", myport);
693 JackGlobals::CheckContext(
"jack_port_request_monitor_by_name");
696 if (client == NULL) {
697 jack_error(
"jack_port_request_monitor_by_name called with a NULL client");
703 jack_port_id_t myport = manager->GetPort(port_name);
704 if (!CheckPort(myport)) {
705 jack_error(
"jack_port_request_monitor_by_name called with an incorrect port %s", port_name);
715 JackGlobals::CheckContext(
"jack_port_ensure_monitor");
717 uintptr_t port_aux = (uintptr_t)port;
718 jack_port_id_t myport = (jack_port_id_t)port_aux;
719 if (!CheckPort(myport)) {
720 jack_error(
"jack_port_ensure_monitor called with an incorrect port %ld", myport);
724 return (manager ? manager->GetPort(myport)->
EnsureMonitor(onoff) : -1);
730 JackGlobals::CheckContext(
"jack_port_monitoring_input");
732 uintptr_t port_aux = (uintptr_t)port;
733 jack_port_id_t myport = (jack_port_id_t)port_aux;
734 if (!CheckPort(myport)) {
735 jack_error(
"jack_port_monitoring_input called with an incorrect port %ld", myport);
739 return (manager ? manager->GetPort(myport)->MonitoringInput() : -1);
743 LIB_EXPORT
int jack_is_realtime(jack_client_t* ext_client)
745 JackGlobals::CheckContext(
"jack_is_realtime");
748 if (client == NULL) {
749 jack_error(
"jack_is_realtime called with a NULL client");
753 return (control ? control->fRealTime : -1);
757 LIB_EXPORT
void jack_on_shutdown(jack_client_t* ext_client, JackShutdownCallback callback,
void* arg)
759 JackGlobals::CheckContext(
"jack_on_shutdown");
762 if (client == NULL) {
763 jack_error(
"jack_on_shutdown called with a NULL client");
765 client->OnShutdown(callback, arg);
771 JackGlobals::CheckContext(
"jack_on_info_shutdown");
774 if (client == NULL) {
775 jack_error(
"jack_on_info_shutdown called with a NULL client");
777 client->OnInfoShutdown(callback, arg);
783 JackGlobals::CheckContext(
"jack_set_process_callback");
786 if (client == NULL) {
787 jack_error(
"jack_set_process_callback called with a NULL client");
790 return client->SetProcessCallback(callback, arg);
796 JackGlobals::CheckContext(
"jack_thread_wait");
799 if (client == NULL) {
800 jack_error(
"jack_thread_wait called with a NULL client");
803 jack_error(
"jack_thread_wait: deprecated, use jack_cycle_wait/jack_cycle_signal");
810 JackGlobals::CheckContext(
"jack_cycle_wait");
813 if (client == NULL) {
814 jack_error(
"jack_cycle_wait called with a NULL client");
817 return client->CycleWait();
823 JackGlobals::CheckContext(
"jack_cycle_signal");
826 if (client == NULL) {
827 jack_error(
"jack_cycle_signal called with a NULL client");
829 client->CycleSignal(status);
835 JackGlobals::CheckContext(
"jack_set_process_thread");
838 if (client == NULL) {
839 jack_error(
"jack_set_process_thread called with a NULL client");
842 return client->SetProcessThread(fun, arg);
848 JackGlobals::CheckContext(
"jack_set_freewheel_callback");
851 if (client == NULL) {
852 jack_error(
"jack_set_freewheel_callback called with a NULL client");
855 return client->SetFreewheelCallback(freewheel_callback, arg);
861 JackGlobals::CheckContext(
"jack_set_freewheel");
864 if (client == NULL) {
865 jack_error(
"jack_set_freewheel called with a NULL client");
868 return client->SetFreeWheel(onoff);
874 JackGlobals::CheckContext(
"jack_set_buffer_size");
877 if (client == NULL) {
878 jack_error(
"jack_set_buffer_size called with a NULL client");
880 }
else if (!CheckBufferSize(buffer_size)) {
883 return client->SetBufferSize(buffer_size);
889 JackGlobals::CheckContext(
"jack_set_buffer_size_callback");
892 if (client == NULL) {
893 jack_error(
"jack_set_buffer_size_callback called with a NULL client");
896 return client->SetBufferSizeCallback(bufsize_callback, arg);
902 JackGlobals::CheckContext(
"jack_set_sample_rate_callback");
905 if (client == NULL) {
906 jack_error(
"jack_set_sample_rate_callback called with a NULL client");
909 return client->SetSampleRateCallback(srate_callback, arg);
915 JackGlobals::CheckContext(
"jack_set_client_registration_callback");
918 if (client == NULL) {
919 jack_error(
"jack_set_client_registration_callback called with a NULL client");
922 return client->SetClientRegistrationCallback(registration_callback, arg);
928 JackGlobals::CheckContext(
"jack_set_port_registration_callback");
931 if (client == NULL) {
932 jack_error(
"jack_set_port_registration_callback called with a NULL client");
935 return client->SetPortRegistrationCallback(registration_callback, arg);
941 JackGlobals::CheckContext(
"jack_set_port_connect_callback");
944 if (client == NULL) {
945 jack_error(
"jack_set_port_connect_callback called with a NULL client");
948 return client->SetPortConnectCallback(portconnect_callback, arg);
954 JackGlobals::CheckContext(
"jack_set_port_rename_callback");
957 if (client == NULL) {
958 jack_error(
"jack_set_port_rename_callback called with a NULL client");
961 return client->SetPortRenameCallback(rename_callback, arg);
967 JackGlobals::CheckContext(
"jack_set_graph_order_callback");
970 jack_log(
"jack_set_graph_order_callback ext_client %x client %x ", ext_client, client);
971 if (client == NULL) {
972 jack_error(
"jack_set_graph_order_callback called with a NULL client");
975 return client->SetGraphOrderCallback(graph_callback, arg);
981 JackGlobals::CheckContext(
"jack_set_xrun_callback");
984 if (client == NULL) {
985 jack_error(
"jack_set_xrun_callback called with a NULL client");
988 return client->SetXRunCallback(xrun_callback, arg);
992 LIB_EXPORT
int jack_set_latency_callback(jack_client_t* ext_client, JackLatencyCallback latency_callback,
void *arg)
994 JackGlobals::CheckContext(
"jack_set_latency_callback");
997 if (client == NULL) {
998 jack_error(
"jack_set_latency_callback called with a NULL client");
1001 return client->SetLatencyCallback(latency_callback, arg);
1007 JackGlobals::CheckContext(
"jack_set_thread_init_callback");
1010 jack_log(
"jack_set_thread_init_callback ext_client %x client %x ", ext_client, client);
1011 if (client == NULL) {
1012 jack_error(
"jack_set_thread_init_callback called with a NULL client");
1015 return client->SetInitCallback(init_callback, arg);
1021 JackGlobals::CheckContext(
"jack_activate");
1024 if (client == NULL) {
1025 jack_error(
"jack_activate called with a NULL client");
1034 JackGlobals::CheckContext(
"jack_deactivate");
1037 if (client == NULL) {
1038 jack_error(
"jack_deactivate called with a NULL client");
1045 LIB_EXPORT jack_port_t*
jack_port_register(jack_client_t* ext_client,
const char* port_name,
const char* port_type,
unsigned long flags,
unsigned long buffer_size)
1047 JackGlobals::CheckContext(
"jack_port_register");
1050 if (client == NULL) {
1051 jack_error(
"jack_port_register called with a NULL client");
1053 }
else if ((port_name == NULL) || (port_type == NULL)) {
1054 jack_error(
"jack_port_register called with a NULL port name or a NULL port_type");
1057 return (jack_port_t *)((uintptr_t)client->PortRegister(port_name, port_type, flags, buffer_size));
1063 JackGlobals::CheckContext(
"jack_port_unregister");
1066 if (client == NULL) {
1067 jack_error(
"jack_port_unregister called with a NULL client");
1070 uintptr_t port_aux = (uintptr_t)port;
1071 jack_port_id_t myport = (jack_port_id_t)port_aux;
1072 if (!CheckPort(myport)) {
1073 jack_error(
"jack_port_unregister called with an incorrect port %ld", myport);
1076 return client->PortUnRegister(myport);
1081 JackGlobals::CheckContext(
"jack_port_is_mine");
1084 if (client == NULL) {
1085 jack_error(
"jack_port_is_mine called with a NULL client");
1088 uintptr_t port_aux = (uintptr_t)port;
1089 jack_port_id_t myport = (jack_port_id_t)port_aux;
1090 if (!CheckPort(myport)) {
1091 jack_error(
"jack_port_is_mine called with an incorrect port %ld", myport);
1094 return client->PortIsMine(myport);
1099 JackGlobals::CheckContext(
"jack_port_get_connections");
1101 uintptr_t port_aux = (uintptr_t)port;
1102 jack_port_id_t myport = (jack_port_id_t)port_aux;
1103 if (!CheckPort(myport)) {
1104 jack_error(
"jack_port_get_connections called with an incorrect port %ld", myport);
1109 return (manager ? manager->GetConnections(myport) : NULL);
1116 JackGlobals::CheckContext(
"jack_port_get_all_connections");
1119 if (client == NULL) {
1120 jack_error(
"jack_port_get_all_connections called with a NULL client");
1124 uintptr_t port_aux = (uintptr_t)port;
1125 jack_port_id_t myport = (jack_port_id_t)port_aux;
1126 if (!CheckPort(myport)) {
1127 jack_error(
"jack_port_get_all_connections called with an incorrect port %ld", myport);
1132 return (manager ? manager->GetConnections(myport) : NULL);
1138 JackGlobals::CheckContext(
"jack_port_get_total_latency");
1141 if (client == NULL) {
1142 jack_error(
"jack_port_get_total_latency called with a NULL client");
1146 uintptr_t port_aux = (uintptr_t)port;
1147 jack_port_id_t myport = (jack_port_id_t)port_aux;
1148 if (!CheckPort(myport)) {
1149 jack_error(
"jack_port_get_total_latency called with an incorrect port %ld", myport);
1155 manager->ComputeTotalLatency(myport);
1156 return manager->GetPort(myport)->GetTotalLatency();
1163 LIB_EXPORT
int jack_connect(jack_client_t* ext_client,
const char* src,
const char* dst)
1165 JackGlobals::CheckContext(
"jack_connect");
1168 if (client == NULL) {
1169 jack_error(
"jack_connect called with a NULL client");
1171 }
else if ((src == NULL) || (dst == NULL)) {
1172 jack_error(
"jack_connect called with a NULL port name");
1175 return client->PortConnect(src, dst);
1179 LIB_EXPORT
int jack_disconnect(jack_client_t* ext_client,
const char* src,
const char* dst)
1181 JackGlobals::CheckContext(
"jack_disconnect");
1184 if (client == NULL) {
1185 jack_error(
"jack_disconnect called with a NULL client");
1187 }
else if ((src == NULL) || (dst == NULL)) {
1188 jack_error(
"jack_disconnect called with a NULL port name");
1191 return client->PortDisconnect(src, dst);
1197 JackGlobals::CheckContext(
"jack_port_disconnect");
1200 if (client == NULL) {
1201 jack_error(
"jack_port_disconnect called with a NULL client");
1204 uintptr_t port_aux = (uintptr_t)src;
1205 jack_port_id_t myport = (jack_port_id_t)port_aux;
1206 if (!CheckPort(myport)) {
1207 jack_error(
"jack_port_disconnect called with an incorrect port %ld", myport);
1210 return client->PortDisconnect(myport);
1215 JackGlobals::CheckContext(
"jack_get_sample_rate");
1218 if (client == NULL) {
1219 jack_error(
"jack_get_sample_rate called with a NULL client");
1223 return (control ? control->fSampleRate : 0);
1229 JackGlobals::CheckContext(
"jack_get_buffer_size");
1232 if (client == NULL) {
1233 jack_error(
"jack_get_buffer_size called with a NULL client");
1237 return (control ? control->fBufferSize : 0);
1241 LIB_EXPORT
const char**
jack_get_ports(jack_client_t* ext_client,
const char* port_name_pattern,
const char* type_name_pattern,
unsigned long flags)
1243 JackGlobals::CheckContext(
"jack_get_ports");
1246 if (client == NULL) {
1247 jack_error(
"jack_get_ports called with a NULL client");
1251 return (manager ? manager->GetPorts(port_name_pattern, type_name_pattern, flags) : NULL);
1256 JackGlobals::CheckContext(
"jack_port_by_name");
1259 if (client == NULL) {
1260 jack_error(
"jack_get_ports called with a NULL client");
1264 if (portname == NULL) {
1265 jack_error(
"jack_port_by_name called with a NULL port name");
1271 int res = manager->GetPort(portname);
1272 return (res == NO_PORT) ? NULL : (jack_port_t*)((uintptr_t)res);
1278 JackGlobals::CheckContext(
"jack_port_by_id");
1281 return (jack_port_t*)((uintptr_t)
id);
1286 JackGlobals::CheckContext(
"jack_engine_takeover_timebase");
1289 if (client == NULL) {
1290 jack_error(
"jack_engine_takeover_timebase called with a NULL client");
1293 jack_error(
"jack_engine_takeover_timebase: deprecated\n");
1300 JackGlobals::CheckContext(
"jack_frames_since_cycle_start");
1305 control->ReadFrameTime(&timer);
1306 return timer.FramesSinceCycleStart(GetMicroSeconds(), control->fSampleRate);
1314 JackGlobals::CheckContext(
"jack_get_time");
1316 return GetMicroSeconds();
1321 JackGlobals::CheckContext(
"jack_frames_to_time");
1324 if (client == NULL) {
1325 jack_error(
"jack_frames_to_time called with a NULL client");
1331 control->ReadFrameTime(&timer);
1332 return timer.Frames2Time(frames, control->fBufferSize);
1341 JackGlobals::CheckContext(
"jack_time_to_frames");
1344 if (client == NULL) {
1345 jack_error(
"jack_time_to_frames called with a NULL client");
1351 control->ReadFrameTime(&timer);
1352 return timer.Time2Frames(usecs, control->fBufferSize);
1361 JackGlobals::CheckContext(
"jack_frame_time");
1368 JackGlobals::CheckContext(
"jack_last_frame_time");
1371 return (control) ? control->fFrameTimer.
ReadCurrentState()->CurFrame() : 0;
1375 jack_nframes_t *current_frames,
1376 jack_time_t *current_usecs,
1377 jack_time_t *next_usecs,
1378 float *period_usecs)
1380 JackGlobals::CheckContext(
"jack_get_cycle_times");
1385 control->ReadFrameTime(&timer);
1386 return timer.GetCycleTimes(current_frames, current_usecs, next_usecs, period_usecs);
1394 JackGlobals::CheckContext(
"jack_cpu_load");
1397 if (client == NULL) {
1398 jack_error(
"jack_cpu_load called with a NULL client");
1402 return (control ? control->fCPULoad : 0.0f);
1408 JackGlobals::CheckContext(
"jack_client_thread_id");
1411 if (client == NULL) {
1412 jack_error(
"jack_client_thread_id called with a NULL client");
1413 return (jack_native_thread_t)NULL;
1415 return client->GetThreadID();
1421 JackGlobals::CheckContext(
"jack_get_client_name");
1424 if (client == NULL) {
1425 jack_error(
"jack_get_client_name called with a NULL client");
1428 return client->GetClientControl()->fName;
1434 return JACK_CLIENT_NAME_SIZE;
1439 return REAL_JACK_PORT_NAME_SIZE;
1444 return JACK_PORT_TYPE_SIZE;
1449 JackGlobals::CheckContext(
"jack_port_type_get_buffer_size");
1452 if (client == NULL) {
1453 jack_error(
"jack_port_type_get_buffer_size called with a NULL client");
1456 jack_port_type_id_t port_id = GetPortTypeId(port_type);
1457 if (port_id == PORT_TYPES_MAX) {
1458 jack_error(
"jack_port_type_get_buffer_size called with an unknown port type = %s", port_type);
1461 return GetPortType(port_id)->size();
1469 JackGlobals::CheckContext(
"jack_release_timebase");
1472 if (client == NULL) {
1473 jack_error(
"jack_release_timebase called with a NULL client");
1476 return client->ReleaseTimebase();
1482 JackGlobals::CheckContext(
"jack_set_sync_callback");
1485 if (client == NULL) {
1486 jack_error(
"jack_set_sync_callback called with a NULL client");
1489 return client->SetSyncCallback(sync_callback, arg);
1495 JackGlobals::CheckContext(
"jack_set_sync_timeout");
1498 if (client == NULL) {
1499 jack_error(
"jack_set_sync_timeout called with a NULL client");
1502 return client->SetSyncTimeout(timeout);
1508 JackGlobals::CheckContext(
"jack_set_timebase_callback");
1511 if (client == NULL) {
1512 jack_error(
"jack_set_timebase_callback called with a NULL client");
1515 return client->SetTimebaseCallback(conditional, timebase_callback, arg);
1521 JackGlobals::CheckContext(
"jack_transport_locate");
1524 if (client == NULL) {
1525 jack_error(
"jack_transport_locate called with a NULL client");
1528 client->TransportLocate(frame);
1535 JackGlobals::CheckContext(
"jack_transport_query");
1538 if (client == NULL) {
1539 jack_error(
"jack_transport_query called with a NULL client");
1540 return JackTransportStopped;
1542 return client->TransportQuery(pos);
1548 JackGlobals::CheckContext(
"jack_get_current_transport_frame");
1551 if (client == NULL) {
1552 jack_error(
"jack_get_current_transport_frame called with a NULL client");
1555 return client->GetCurrentTransportFrame();
1561 JackGlobals::CheckContext(
"jack_transport_reposition");
1564 if (client == NULL) {
1565 jack_error(
"jack_transport_reposition called with a NULL client");
1568 client->TransportReposition(pos);
1575 JackGlobals::CheckContext(
"jack_transport_start");
1578 if (client == NULL) {
1579 jack_error(
"jack_transport_start called with a NULL client");
1581 client->TransportStart();
1587 JackGlobals::CheckContext(
"jack_transport_stop");
1590 if (client == NULL) {
1591 jack_error(
"jack_transport_stop called with a NULL client");
1593 client->TransportStop();
1600 JackGlobals::CheckContext(
"jack_get_transport_info");
1602 jack_error(
"jack_get_transport_info: deprecated");
1609 JackGlobals::CheckContext(
"jack_set_transport_info");
1611 jack_error(
"jack_set_transport_info: deprecated");
1617 LIB_EXPORT
float jack_get_max_delayed_usecs(jack_client_t* ext_client)
1619 JackGlobals::CheckContext(
"jack_get_max_delayed_usecs");
1622 if (client == NULL) {
1623 jack_error(
"jack_get_max_delayed_usecs called with a NULL client");
1627 return (control ? control->fMaxDelayedUsecs : 0.f);
1631 LIB_EXPORT
float jack_get_xrun_delayed_usecs(jack_client_t* ext_client)
1633 JackGlobals::CheckContext(
"jack_get_xrun_delayed_usecs");
1636 if (client == NULL) {
1637 jack_error(
"jack_get_xrun_delayed_usecs called with a NULL client");
1641 return (control ? control->fXrunDelayedUsecs : 0.f);
1645 LIB_EXPORT
void jack_reset_max_delayed_usecs(jack_client_t* ext_client)
1647 JackGlobals::CheckContext(
"jack_reset_max_delayed_usecs");
1650 if (client == NULL) {
1651 jack_error(
"jack_reset_max_delayed_usecs called with a NULL client");
1654 control->ResetXRun();
1661 JackGlobals::CheckContext(
"jack_client_real_time_priority");
1664 if (client == NULL) {
1665 jack_error(
"jack_client_real_time_priority called with a NULL client");
1669 return (control->fRealTime) ? control->fClientPriority : -1;
1675 JackGlobals::CheckContext(
"jack_client_max_real_time_priority");
1678 if (client == NULL) {
1679 jack_error(
"jack_client_max_real_time_priority called with a NULL client");
1683 return (control->fRealTime) ? control->fMaxClientPriority : -1;
1691 ? JackThread::AcquireRealTimeImp(thread, priority, control->fPeriod, control->fComputation, control->fConstraint)
1696 jack_native_thread_t *thread,
1699 thread_routine routine,
1702 JackGlobals::CheckContext(
"jack_client_create_thread");
1705 int res = JackThread::StartImp(thread, priority, realtime, routine, arg);
1707 ? ((realtime ? JackThread::AcquireRealTimeImp(*thread, priority, control->fPeriod, control->fComputation, control->fConstraint) : res))
1713 return JackThread::DropRealTimeImp(thread);
1718 JackGlobals::CheckContext(
"jack_client_stop_thread");
1720 return JackThread::StopImp(thread);
1725 JackGlobals::CheckContext(
"jack_client_kill_thread");
1727 return JackThread::KillImp(thread);
1734 JackGlobals::fJackThreadCreator = pthread_create;
1736 JackGlobals::fJackThreadCreator = jtc;
1743 const char* load_name,
1744 const char* load_init)
1746 JackGlobals::CheckContext(
"jack_internal_client_new");
1748 jack_error(
"jack_internal_client_new: deprecated");
1754 JackGlobals::CheckContext(
"jack_internal_client_close");
1756 jack_error(
"jack_internal_client_close: deprecated");
1759 LIB_EXPORT
char* jack_get_internal_client_name(jack_client_t* ext_client, jack_intclient_t intclient)
1761 JackGlobals::CheckContext(
"jack_get_internal_client_name");
1764 if (client == NULL) {
1765 jack_error(
"jack_get_internal_client_name called with a NULL client");
1767 }
else if (intclient >= CLIENT_NUM) {
1768 jack_error(
"jack_get_internal_client_name: incorrect client");
1771 return client->GetInternalClientName(intclient);
1775 LIB_EXPORT jack_intclient_t jack_internal_client_handle(jack_client_t* ext_client,
const char* client_name, jack_status_t* status)
1777 JackGlobals::CheckContext(
"jack_internal_client_handle");
1780 if (client == NULL) {
1781 jack_error(
"jack_internal_client_handle called with a NULL client");
1784 jack_status_t my_status;
1786 status = &my_status;
1787 *status = (jack_status_t)0;
1788 return client->InternalClientHandle(client_name, status);
1792 static jack_intclient_t jack_internal_client_load_aux(jack_client_t* ext_client,
const char* client_name, jack_options_t options, jack_status_t* status, va_list ap)
1794 JackGlobals::CheckContext(
"jack_internal_client_load_aux");
1797 if (client == NULL) {
1798 jack_error(
"jack_internal_client_load called with a NULL client");
1802 jack_status_t my_status;
1805 status = &my_status;
1806 *status = (jack_status_t)0;
1809 if ((options & ~JackLoadOptions)) {
1810 int my_status1 = *status | (JackFailure | JackInvalidOption);
1811 *status = (jack_status_t)my_status1;
1816 jack_varargs_parse(options, ap, &va);
1817 return client->InternalClientLoad(client_name, options, status, &va);
1821 LIB_EXPORT jack_intclient_t jack_internal_client_load(jack_client_t *client,
const char* client_name, jack_options_t options, jack_status_t *status, ...)
1823 JackGlobals::CheckContext(
"jack_internal_client_load");
1826 va_start(ap, status);
1827 jack_intclient_t res = jack_internal_client_load_aux(client, client_name, options, status, ap);
1832 LIB_EXPORT jack_status_t jack_internal_client_unload(jack_client_t* ext_client, jack_intclient_t intclient)
1834 JackGlobals::CheckContext(
"jack_internal_client_load");
1837 if (client == NULL) {
1838 jack_error(
"jack_internal_client_unload called with a NULL client");
1839 return (jack_status_t)(JackNoSuchClient | JackFailure);
1840 }
else if (intclient >= CLIENT_NUM) {
1841 jack_error(
"jack_internal_client_unload: incorrect client");
1842 return (jack_status_t)(JackNoSuchClient | JackFailure);
1844 jack_status_t my_status;
1845 client->InternalClientUnload(intclient, &my_status);
1850 LIB_EXPORT
void jack_get_version(
int *major_ptr,
1855 JackGlobals::CheckContext(
"jack_get_version");
1864 LIB_EXPORT
const char* jack_get_version_string()
1866 JackGlobals::CheckContext(
"jack_get_version_string");
1871 LIB_EXPORT
void jack_free(
void* ptr)
1873 JackGlobals::CheckContext(
"jack_free");
1883 JackGlobals::CheckContext(
"jack_set_session_callback");
1886 jack_log(
"jack_set_session_callback ext_client %x client %x ", ext_client, client);
1887 if (client == NULL) {
1888 jack_error(
"jack_set_session_callback called with a NULL client");
1891 return client->SetSessionCallback(session_callback, arg);
1897 JackGlobals::CheckContext(
"jack_session_notify");
1900 jack_log(
"jack_session_notify ext_client %x client %x ", ext_client, client);
1901 if (client == NULL) {
1902 jack_error(
"jack_session_notify called with a NULL client");
1905 return client->SessionNotify(target, ev_type, path);
1911 JackGlobals::CheckContext(
"jack_session_reply");
1914 jack_log(
"jack_session_reply ext_client %x client %x ", ext_client, client);
1915 if (client == NULL) {
1916 jack_error(
"jack_session_reply called with a NULL client");
1919 return client->SessionReply(event);
1925 JackGlobals::CheckContext(
"jack_session_event_free");
1940 JackGlobals::CheckContext(
"jack_client_get_uuid");
1943 if (client == NULL) {
1944 jack_error(
"jack_client_get_uuid called with a NULL client");
1948 snprintf(retval,
sizeof(retval),
"%d", client->GetClientControl()->fSessionID);
1949 return strdup(retval);
1955 JackGlobals::CheckContext(
"jack_get_uuid_for_client_name");
1958 jack_log(
"jack_get_uuid_for_client_name ext_client %x client %x ", ext_client, client);
1959 if (client == NULL) {
1960 jack_error(
"jack_get_uuid_for_client_name called with a NULL client");
1963 return client->GetUUIDForClientName(client_name);
1969 JackGlobals::CheckContext(
"jack_get_client_name_by_uuid");
1972 jack_log(
"jack_get_uuid_for_client_name ext_client %x client %x ", ext_client, client);
1973 if (client == NULL) {
1974 jack_error(
"jack_get_client_name_by_uuid called with a NULL client");
1977 return client->GetClientNameByUUID(client_uuid);
1983 JackGlobals::CheckContext(
"jack_reserve_client_name");
1986 jack_log(
"jack_reserve_client_name ext_client %x client %x ", ext_client, client);
1987 if (client == NULL) {
1988 jack_error(
"jack_reserve_client_name called with a NULL client");
1991 return client->ReserveClientName(client_name, uuid);
1997 JackGlobals::CheckContext(
"jack_session_commands_free");
2006 if (cmds[i].client_name) {
2007 free ((
char *)cmds[i].client_name);
2009 if (cmds[i].command) {
2010 free ((
char *)cmds[i].command);
2013 free ((
char *)cmds[i].uuid);
2026 JackGlobals::CheckContext(
"jack_client_has_session_callback");
2029 jack_log(
"jack_client_has_session_callback ext_client %x client %x ", ext_client, client);
2030 if (client == NULL) {
2031 jack_error(
"jack_client_has_session_callback called with a NULL client");
2034 return client->ClientHasSessionCallback(client_name);
LIB_EXPORT jack_nframes_t jack_port_get_total_latency(jack_client_t *, jack_port_t *port)
LIB_EXPORT int jack_set_client_registration_callback(jack_client_t *, JackClientRegistrationCallback registration_callback, void *arg)
LIB_EXPORT int jack_port_request_monitor(jack_port_t *port, int onoff)
LIB_EXPORT int jack_set_freewheel_callback(jack_client_t *client, JackFreewheelCallback freewheel_callback, void *arg)
T * ReadCurrentState()
Returns the current state : only valid in the RT reader thread.
LIB_EXPORT int jack_set_graph_order_callback(jack_client_t *, JackGraphOrderCallback graph_callback, void *)
LIB_EXPORT int jack_set_buffer_size(jack_client_t *client, jack_nframes_t nframes)
A structure used for time management.
LIB_EXPORT int jack_port_unregister(jack_client_t *, jack_port_t *)
SERVER_EXPORT void(* jack_info_callback)(const char *desc)
LIB_EXPORT int jack_port_tie(jack_port_t *src, jack_port_t *dst)
LIB_EXPORT int jack_set_thread_init_callback(jack_client_t *client, JackThreadInitCallback thread_init_callback, void *arg)
LIB_EXPORT int jack_set_session_callback(jack_client_t *ext_client, JackSessionCallback session_callback, void *arg)
LIB_EXPORT jack_port_type_id_t jack_port_type_id(const jack_port_t *port)
LIB_EXPORT int jack_port_set_name(jack_port_t *port, const char *port_name)
LIB_EXPORT jack_port_t * jack_port_by_id(jack_client_t *client, jack_port_id_t port_id)
LIB_EXPORT void jack_port_set_latency(jack_port_t *, jack_nframes_t)
LIB_EXPORT int jack_port_set_alias(jack_port_t *port, const char *alias)
LIB_EXPORT void jack_set_transport_info(jack_client_t *client, jack_transport_info_t *tinfo)
LIB_EXPORT int jack_port_ensure_monitor(jack_port_t *port, int onoff)
LIB_EXPORT int jack_client_real_time_priority(jack_client_t *)
LIB_EXPORT void jack_cycle_signal(jack_client_t *, int status)
LIB_EXPORT jack_transport_state_t jack_transport_query(const jack_client_t *client, jack_position_t *pos)
LIB_EXPORT void jack_internal_client_close(const char *client_name)
LIB_EXPORT jack_nframes_t jack_cycle_wait(jack_client_t *)
LIB_EXPORT int jack_port_name_size(void)
LIB_EXPORT int jack_set_process_callback(jack_client_t *client, JackProcessCallback process_callback, void *arg)
LIB_EXPORT int jack_recompute_total_latency(jack_client_t *, jack_port_t *port)
LIB_EXPORT int jack_activate(jack_client_t *client)
SERVER_EXPORT void(* jack_error_callback)(const char *desc)
LIB_EXPORT int jack_client_stop_thread(jack_client_t *client, jack_native_thread_t thread)
LIB_EXPORT const char * jack_port_type(const jack_port_t *port)
virtual int Deactivate()
Need to stop thread after deactivating in the server.
void jack_set_info_function(void(*func)(const char *)) JACK_OPTIONAL_WEAK_EXPORT
LIB_EXPORT jack_native_thread_t jack_client_thread_id(jack_client_t *)
LIB_EXPORT const char ** jack_port_get_connections(const jack_port_t *port)
SERVER_EXPORT void jack_error(const char *fmt,...)
LIB_EXPORT int jack_port_disconnect(jack_client_t *, jack_port_t *)
LIB_EXPORT void jack_port_set_latency_range(jack_port_t *port, jack_latency_callback_mode_t mode, jack_latency_range_t *range)
LIB_EXPORT jack_time_t jack_get_time()
LIB_EXPORT char * jack_client_get_uuid(jack_client_t *client)
LIB_EXPORT int jack_connect(jack_client_t *, const char *source_port, const char *destination_port)
LIB_EXPORT int jack_disconnect(jack_client_t *, const char *source_port, const char *destination_port)
LIB_EXPORT jack_port_t * jack_port_register(jack_client_t *client, const char *port_name, const char *port_type, unsigned long flags, unsigned long buffer_size)
LIB_EXPORT int jack_release_timebase(jack_client_t *client)
LIB_EXPORT const char ** jack_port_get_all_connections(const jack_client_t *client, const jack_port_t *port)
LIB_EXPORT int jack_acquire_real_time_scheduling(jack_native_thread_t thread, int priority)
LIB_EXPORT int jack_port_type_size(void)
LIB_EXPORT void jack_on_shutdown(jack_client_t *client, JackShutdownCallback shutdown_callback, void *arg)
LIB_EXPORT int jack_set_port_connect_callback(jack_client_t *, JackPortConnectCallback connect_callback, void *arg)
LIB_EXPORT jack_client_t * jack_client_open(const char *client_name, jack_options_t options, jack_status_t *status,...)
LIB_EXPORT char * jack_get_uuid_for_client_name(jack_client_t *ext_client, const char *client_name)
LIB_EXPORT jack_nframes_t jack_frame_time(const jack_client_t *)
LIB_EXPORT char * jack_get_client_name(jack_client_t *client)
LIB_EXPORT jack_nframes_t jack_last_frame_time(const jack_client_t *client)
LIB_EXPORT int jack_port_monitoring_input(jack_port_t *port)
LIB_EXPORT int jack_client_has_session_callback(jack_client_t *client, const char *client_name)
void jack_set_error_function(void(*func)(const char *)) JACK_OPTIONAL_WEAK_EXPORT
Graph manager: contains the connection manager and the port array.
LIB_EXPORT void jack_transport_start(jack_client_t *client)
LIB_EXPORT void jack_session_commands_free(jack_session_command_t *cmds)
LIB_EXPORT int jack_set_port_rename_callback(jack_client_t *, JackPortRenameCallback rename_callback, void *arg)
LIB_EXPORT int jack_set_xrun_callback(jack_client_t *, JackXRunCallback xrun_callback, void *arg)
LIB_EXPORT int jack_set_sync_timeout(jack_client_t *client, jack_time_t timeout)
LIB_EXPORT jack_session_command_t * jack_session_notify(jack_client_t *ext_client, const char *target, jack_session_event_type_t ev_type, const char *path)
virtual int Activate()
We need to start thread before activating in the server, otherwise the FW driver connected to the cli...
LIB_EXPORT int jack_reserve_client_name(jack_client_t *ext_client, const char *name, const char *uuid)
LIB_EXPORT jack_nframes_t jack_get_buffer_size(jack_client_t *)
LIB_EXPORT jack_nframes_t jack_port_get_latency(jack_port_t *port)
LIB_EXPORT int jack_port_untie(jack_port_t *port)
LIB_EXPORT int jack_client_max_real_time_priority(jack_client_t *)
LIB_EXPORT void jack_set_thread_creator(jack_thread_creator_t jtc)
LIB_EXPORT int jack_set_sample_rate_callback(jack_client_t *client, JackSampleRateCallback srate_callback, void *arg)
LIB_EXPORT int jack_transport_locate(jack_client_t *client, jack_nframes_t frame)
LIB_EXPORT void * jack_port_get_buffer(jack_port_t *, jack_nframes_t)
LIB_EXPORT jack_time_t jack_frames_to_time(const jack_client_t *client, jack_nframes_t frames)
LIB_EXPORT int jack_port_get_aliases(const jack_port_t *port, char *const aliases[2])
LIB_EXPORT void jack_transport_stop(jack_client_t *client)
LIB_EXPORT jack_nframes_t jack_frames_since_cycle_start(const jack_client_t *)
LIB_EXPORT int jack_recompute_total_latencies(jack_client_t *)
LIB_EXPORT int jack_port_connected_to(const jack_port_t *port, const char *port_name)
LIB_EXPORT int jack_port_is_mine(const jack_client_t *, const jack_port_t *port)
LIB_EXPORT int jack_port_unset_alias(jack_port_t *port, const char *alias)
LIB_EXPORT int jack_client_create_thread(jack_client_t *client, jack_native_thread_t *thread, int priority, int realtime, thread_routine routine, void *arg)
LIB_EXPORT int jack_drop_real_time_scheduling(jack_native_thread_t thread)
LIB_EXPORT int jack_transport_reposition(jack_client_t *client, const jack_position_t *pos)
LIB_EXPORT jack_port_t * jack_port_by_name(jack_client_t *, const char *port_name)
LIB_EXPORT jack_nframes_t jack_get_sample_rate(jack_client_t *)
LIB_EXPORT int jack_set_timebase_callback(jack_client_t *client, int conditional, JackTimebaseCallback timebase_callback, void *arg)
LIB_EXPORT size_t jack_port_type_get_buffer_size(jack_client_t *client, const char *port_type)
LIB_EXPORT int jack_set_buffer_size_callback(jack_client_t *client, JackBufferSizeCallback bufsize_callback, void *arg)
LIB_EXPORT float jack_cpu_load(jack_client_t *client)
LIB_EXPORT int jack_set_sync_callback(jack_client_t *client, JackSyncCallback sync_callback, void *arg)
LIB_EXPORT int jack_port_connected(const jack_port_t *port)
LIB_EXPORT void jack_on_info_shutdown(jack_client_t *client, JackInfoShutdownCallback shutdown_callback, void *arg)
LIB_EXPORT int jack_port_request_monitor_by_name(jack_client_t *client, const char *port_name, int onoff)
int RequestMonitor(jack_port_id_t port_index, bool onoff)
LIB_EXPORT int jack_internal_client_new(const char *client_name, const char *load_name, const char *load_init)
LIB_EXPORT int jack_session_reply(jack_client_t *ext_client, jack_session_event_t *event)
LIB_EXPORT int jack_engine_takeover_timebase(jack_client_t *)
LIB_EXPORT int jack_get_cycle_times(const jack_client_t *client, jack_nframes_t *current_frames, jack_time_t *current_usecs, jack_time_t *next_usecs, float *period_usecs)
Engine control in shared memory.
LIB_EXPORT jack_nframes_t jack_thread_wait(jack_client_t *client, int status)
LIB_EXPORT const char * jack_port_name(const jack_port_t *port)
LIB_EXPORT int jack_client_name_size(void)
LIB_EXPORT jack_nframes_t jack_time_to_frames(const jack_client_t *client, jack_time_t usecs)
LIB_EXPORT const char ** jack_get_ports(jack_client_t *, const char *port_name_pattern, const char *type_name_pattern, unsigned long flags)
LIB_EXPORT char * jack_get_client_name_by_uuid(jack_client_t *ext_client, const char *client_uuid)
LIB_EXPORT int jack_port_flags(const jack_port_t *port)
LIB_EXPORT int jack_set_port_registration_callback(jack_client_t *, JackPortRegistrationCallback registration_callback, void *arg)
LIB_EXPORT int jack_deactivate(jack_client_t *client)
LIB_EXPORT jack_client_t * jack_client_new(const char *client_name)
LIB_EXPORT int jack_set_process_thread(jack_client_t *client, JackThreadCallback fun, void *arg)
LIB_EXPORT void jack_get_transport_info(jack_client_t *client, jack_transport_info_t *tinfo)
SERVER_EXPORT void jack_log(const char *fmt,...)
LIB_EXPORT jack_nframes_t jack_get_current_transport_frame(const jack_client_t *client)
void(* JackSessionCallback)(jack_session_event_t *event, void *arg)
LIB_EXPORT void jack_port_get_latency_range(jack_port_t *port, jack_latency_callback_mode_t mode, jack_latency_range_t *range)
LIB_EXPORT const char * jack_port_short_name(const jack_port_t *port)
int EnsureMonitor(bool onoff)
The base class for clients: share part of the implementation for JackInternalClient and JackLibClient...
LIB_EXPORT int jack_client_kill_thread(jack_client_t *client, jack_native_thread_t thread)
LIB_EXPORT void jack_session_event_free(jack_session_event_t *ev)
LIB_EXPORT int jack_set_freewheel(jack_client_t *client, int onoff)