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" 29 #include "JackMetadata.h" 39 typedef void (*print_function)(
const char*);
40 typedef void *(*thread_routine)(
void*);
42 LIB_EXPORT
const char* JACK_METADATA_PRETTY_NAME =
"http://jackaudio.org/metadata/pretty-name";
43 LIB_EXPORT
const char* JACK_METADATA_HARDWARE =
"http://jackaudio.org/metadata/hardware";
44 LIB_EXPORT
const char* JACK_METADATA_CONNECTED =
"http://jackaudio.org/metadata/connected";
45 LIB_EXPORT
const char* JACK_METADATA_PORT_GROUP =
"http://jackaudio.org/metadata/port-group";
46 LIB_EXPORT
const char* JACK_METADATA_ICON_SMALL =
"http://jackaudio.org/metadata/icon-small";
47 LIB_EXPORT
const char* JACK_METADATA_ICON_LARGE =
"http://jackaudio.org/metadata/icon-large";
59 jack_get_version_string();
61 jack_client_t * jack_client_new_aux(
const char* client_name,
62 jack_options_t options,
63 jack_status_t *status);
66 jack_options_t options,
67 jack_status_t *status, ...);
72 const char* load_name,
73 const char* load_init);
75 LIB_EXPORT
int jack_is_realtime(jack_client_t *client);
77 JackShutdownCallback shutdown_callback,
void *arg);
79 JackInfoShutdownCallback shutdown_callback,
void *arg);
81 JackProcessCallback process_callback,
83 LIB_EXPORT jack_nframes_t
jack_thread_wait(jack_client_t *client,
int status);
91 JackThreadInitCallback thread_init_callback,
94 JackFreewheelCallback freewheel_callback,
99 JackBufferSizeCallback bufsize_callback,
102 JackSampleRateCallback srate_callback,
105 JackClientRegistrationCallback
106 registration_callback,
void *arg);
108 JackPortRegistrationCallback
109 registration_callback,
void *arg);
111 JackPortConnectCallback
112 connect_callback,
void *arg);
114 JackPortRenameCallback
115 rename_callback,
void *arg);
117 JackGraphOrderCallback graph_callback,
120 JackXRunCallback xrun_callback,
void *arg);
121 LIB_EXPORT
int jack_set_latency_callback(jack_client_t *client,
122 JackLatencyCallback latency_callback,
void *arg);
127 const char* port_name,
128 const char* port_type,
130 unsigned long buffer_size);
139 LIB_EXPORT
int jack_port_is_mine(
const jack_client_t *,
const jack_port_t *port);
142 const char* port_name);
145 const jack_port_t *port);
146 LIB_EXPORT
int jack_port_tie(jack_port_t *src, jack_port_t *dst);
162 LIB_EXPORT
int jack_port_rename(jack_client_t *client, jack_port_t *port,
const char* port_name);
168 const char* port_name,
int onoff);
172 const char* source_port,
173 const char* destination_port);
175 const char* source_port,
176 const char* destination_port);
184 const char* port_name_pattern,
185 const char* type_name_pattern,
186 unsigned long flags);
187 LIB_EXPORT jack_port_t *
jack_port_by_name(jack_client_t *,
const char* port_name);
189 jack_port_id_t port_id);
193 LIB_EXPORT jack_nframes_t
jack_time_to_frames(
const jack_client_t *client, jack_time_t usecs);
194 LIB_EXPORT jack_time_t
jack_frames_to_time(
const jack_client_t *client, jack_nframes_t frames);
198 jack_nframes_t *current_frames,
199 jack_time_t *current_usecs,
200 jack_time_t *next_usecs,
201 float *period_usecs);
207 LIB_EXPORT
float jack_get_max_delayed_usecs(jack_client_t *client);
208 LIB_EXPORT
float jack_get_xrun_delayed_usecs(jack_client_t *client);
209 LIB_EXPORT
void jack_reset_max_delayed_usecs(jack_client_t *client);
213 JackSyncCallback sync_callback,
216 jack_time_t timeout);
219 JackTimebaseCallback timebase_callback,
222 jack_nframes_t frame);
239 jack_native_thread_t *thread,
242 thread_routine routine,
251 LIB_EXPORT
char * jack_get_internal_client_name(jack_client_t *client,
252 jack_intclient_t intclient);
253 LIB_EXPORT jack_intclient_t jack_internal_client_handle(jack_client_t *client,
254 const char* client_name,
255 jack_status_t *status);
256 LIB_EXPORT jack_intclient_t jack_internal_client_load(jack_client_t *client,
257 const char* client_name,
258 jack_options_t options,
259 jack_status_t *status, ...);
261 LIB_EXPORT jack_status_t jack_internal_client_unload(jack_client_t *client,
262 jack_intclient_t intclient);
263 LIB_EXPORT
void jack_free(
void* ptr);
276 LIB_EXPORT
int jack_set_property(jack_client_t*, jack_uuid_t subject,
const char* key,
const char* value,
const char* type);
277 LIB_EXPORT
int jack_get_property(jack_uuid_t subject,
const char* key,
char** value,
char** type);
281 LIB_EXPORT
int jack_remove_property(jack_client_t* client, jack_uuid_t subject,
const char* key);
286 LIB_EXPORT jack_uuid_t jack_client_uuid_generate();
287 LIB_EXPORT jack_uuid_t jack_port_uuid_generate(uint32_t port_id);
288 LIB_EXPORT uint32_t jack_uuid_to_index(jack_uuid_t);
289 LIB_EXPORT
int jack_uuid_compare(jack_uuid_t, jack_uuid_t);
290 LIB_EXPORT
void jack_uuid_copy(jack_uuid_t* dst, jack_uuid_t src);
291 LIB_EXPORT
void jack_uuid_clear(jack_uuid_t*);
292 LIB_EXPORT
int jack_uuid_parse(
const char* buf, jack_uuid_t*);
293 LIB_EXPORT
void jack_uuid_unparse(jack_uuid_t,
char buf[JACK_UUID_STRING_SIZE]);
294 LIB_EXPORT
int jack_uuid_empty(jack_uuid_t);
300 static inline bool CheckPort(jack_port_id_t port_index)
302 return (port_index > 0 && port_index < PORT_NUM_MAX);
305 static inline bool CheckBufferSize(jack_nframes_t buffer_size)
307 return (buffer_size >= 1 && buffer_size <= BUFFER_SIZE_MAX);
310 static inline void WaitGraphChange()
317 if (jack_tls_get(JackGlobals::fRealTimeThread) == NULL) {
322 if (manager->IsPendingChange()) {
324 JackSleep(
int(control->fPeriodUsecs * 1.1f));
341 JackGlobals::CheckContext(
"jack_client_new");
344 assert(JackGlobals::fOpenMutex);
345 JackGlobals::fOpenMutex->Lock();
347 int options = JackUseExactName;
348 if (getenv(
"JACK_START_SERVER") == NULL) {
349 options |= JackNoStartServer;
351 jack_client_t* res = jack_client_new_aux(client_name, (jack_options_t)options, NULL);
352 JackGlobals::fOpenMutex->Unlock();
354 }
catch (std::bad_alloc& e) {
365 JackGlobals::CheckContext(
"jack_port_get_buffer");
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_get_buffer called with an incorrect port %ld", myport);
374 return (manager ? manager->GetBuffer(myport, frames) : NULL);
385 JackGlobals::CheckContext(
"jack_port_name");
387 uintptr_t port_aux = (uintptr_t)port;
388 jack_port_id_t myport = (jack_port_id_t)port_aux;
389 if (!CheckPort(myport)) {
390 jack_error(
"jack_port_name called with an incorrect port %ld", myport);
394 return (manager ? manager->GetPort(myport)->GetName() : NULL);
400 JackGlobals::CheckContext(
"jack_port_short_name");
402 uintptr_t port_aux = (uintptr_t)port;
403 jack_port_id_t myport = (jack_port_id_t)port_aux;
404 if (!CheckPort(myport)) {
405 jack_error(
"jack_port_short_name called with an incorrect port %ld", myport);
409 return (manager ? manager->GetPort(myport)->GetShortName() : NULL);
415 JackGlobals::CheckContext(
"jack_port_flags");
417 uintptr_t port_aux = (uintptr_t)port;
418 jack_port_id_t myport = (jack_port_id_t)port_aux;
419 if (!CheckPort(myport)) {
420 jack_error(
"jack_port_flags called with an incorrect port %ld", myport);
424 return (manager ? manager->GetPort(myport)->GetFlags() : -1);
430 JackGlobals::CheckContext(
"jack_port_type");
432 uintptr_t port_aux = (uintptr_t)port;
433 jack_port_id_t myport = (jack_port_id_t)port_aux;
434 if (!CheckPort(myport)) {
435 jack_error(
"jack_port_flags called an incorrect port %ld", myport);
439 return (manager ? manager->GetPort(myport)->GetType() : NULL);
445 JackGlobals::CheckContext(
"jack_port_type_id");
447 uintptr_t port_aux = (uintptr_t)port;
448 jack_port_id_t myport = (jack_port_id_t)port_aux;
449 if (!CheckPort(myport)) {
450 jack_error(
"jack_port_type_id called an incorrect port %ld", myport);
454 return (manager ? GetPortTypeId(manager->GetPort(myport)->GetType()) : 0);
460 JackGlobals::CheckContext(
"jack_port_connected");
462 uintptr_t port_aux = (uintptr_t)port;
463 jack_port_id_t myport = (jack_port_id_t)port_aux;
464 if (!CheckPort(myport)) {
465 jack_error(
"jack_port_connected called with an incorrect port %ld", myport);
470 return (manager ? manager->GetConnectionsNum(myport) : -1);
476 JackGlobals::CheckContext(
"jack_port_connected_to");
478 uintptr_t port_aux = (uintptr_t)port;
479 jack_port_id_t src = (jack_port_id_t)port_aux;
480 if (!CheckPort(src)) {
481 jack_error(
"jack_port_connected_to called with an incorrect port %ld", src);
483 }
else if (port_name == NULL) {
484 jack_error(
"jack_port_connected_to called with a NULL port name");
489 jack_port_id_t dst = (manager ? manager->GetPort(port_name) : NO_PORT);
490 if (dst == NO_PORT) {
491 jack_error(
"Unknown destination port port_name = %s", port_name);
494 return manager->IsConnected(src, dst);
501 JackGlobals::CheckContext(
"jack_port_tie");
503 uintptr_t src_aux = (uintptr_t)src;
504 jack_port_id_t mysrc = (jack_port_id_t)src_aux;
505 if (!CheckPort(mysrc)) {
506 jack_error(
"jack_port_tie called with a NULL src port");
509 uintptr_t dst_aux = (uintptr_t)dst;
510 jack_port_id_t mydst = (jack_port_id_t)dst_aux;
511 if (!CheckPort(mydst)) {
512 jack_error(
"jack_port_tie called with a NULL dst port");
516 if (manager && manager->GetPort(mysrc)->GetRefNum() != manager->GetPort(mydst)->GetRefNum()) {
517 jack_error(
"jack_port_tie called with ports not belonging to the same client");
520 return manager->GetPort(mydst)->Tie(mysrc);
526 JackGlobals::CheckContext(
"jack_port_untie");
528 uintptr_t port_aux = (uintptr_t)port;
529 jack_port_id_t myport = (jack_port_id_t)port_aux;
530 if (!CheckPort(myport)) {
531 jack_error(
"jack_port_untie called with an incorrect port %ld", myport);
535 return (manager ? manager->GetPort(myport)->UnTie() : -1);
541 JackGlobals::CheckContext(
"jack_port_get_latency");
543 uintptr_t port_aux = (uintptr_t)port;
544 jack_port_id_t myport = (jack_port_id_t)port_aux;
545 if (!CheckPort(myport)) {
546 jack_error(
"jack_port_get_latency called with an incorrect port %ld", myport);
551 return (manager ? manager->GetPort(myport)->GetLatency() : 0);
557 JackGlobals::CheckContext(
"jack_port_set_latency");
559 uintptr_t port_aux = (uintptr_t)port;
560 jack_port_id_t myport = (jack_port_id_t)port_aux;
561 if (!CheckPort(myport)) {
562 jack_error(
"jack_port_set_latency called with an incorrect port %ld", myport);
566 manager->GetPort(myport)->SetLatency(frames);
572 JackGlobals::CheckContext(
"jack_port_get_latency_range");
574 uintptr_t port_aux = (uintptr_t)port;
575 jack_port_id_t myport = (jack_port_id_t)port_aux;
576 if (!CheckPort(myport)) {
577 jack_error(
"jack_port_get_latency_range called with an incorrect port %ld", myport);
582 manager->GetPort(myport)->GetLatencyRange(mode, range);
588 JackGlobals::CheckContext(
"jack_port_set_latency_range");
590 uintptr_t port_aux = (uintptr_t)port;
591 jack_port_id_t myport = (jack_port_id_t)port_aux;
592 if (!CheckPort(myport)) {
593 jack_error(
"jack_port_set_latency_range called with an incorrect port %ld", myport);
598 manager->GetPort(myport)->SetLatencyRange(mode, range);
604 JackGlobals::CheckContext(
"jack_recompute_total_latency");
608 uintptr_t port_aux = (uintptr_t)port;
609 jack_port_id_t myport = (jack_port_id_t)port_aux;
610 if (client == NULL) {
611 jack_error(
"jack_recompute_total_latency called with a NULL client");
613 }
else if (!CheckPort(myport)) {
614 jack_error(
"jack_recompute_total_latency called with a NULL port");
619 return (manager ? manager->ComputeTotalLatency(myport) : -1);
625 JackGlobals::CheckContext(
"jack_recompute_total_latencies");
628 if (client == NULL) {
629 jack_error(
"jack_recompute_total_latencies called with a NULL client");
632 return client->ComputeTotalLatencies();
638 JackGlobals::CheckContext(
"jack_port_set_name");
642 jack_client_t* client = NULL;
643 for (
int i = 0; i < CLIENT_NUM; i++) {
644 if ((client = (jack_client_t*)JackGlobals::fClientTable[i])) {
652 LIB_EXPORT
int jack_port_rename(jack_client_t* ext_client, jack_port_t* port,
const char* name)
654 JackGlobals::CheckContext(
"jack_port_rename");
657 uintptr_t port_aux = (uintptr_t)port;
658 jack_port_id_t myport = (jack_port_id_t)port_aux;
659 if (client == NULL) {
660 jack_error(
"jack_port_rename called with a NULL client");
662 }
else if (!CheckPort(myport)) {
663 jack_error(
"jack_port_rename called with an incorrect port %ld", myport);
665 }
else if (name == NULL) {
666 jack_error(
"jack_port_rename called with a NULL port name");
669 return client->PortRename(myport, name);
675 JackGlobals::CheckContext(
"jack_port_set_alias");
677 uintptr_t port_aux = (uintptr_t)port;
678 jack_port_id_t myport = (jack_port_id_t)port_aux;
679 if (!CheckPort(myport)) {
680 jack_error(
"jack_port_set_alias called with an incorrect port %ld", myport);
682 }
else if (name == NULL) {
683 jack_error(
"jack_port_set_alias called with a NULL port name");
687 return (manager ? manager->GetPort(myport)->SetAlias(name) : -1);
693 JackGlobals::CheckContext(
"jack_port_unset_alias");
695 uintptr_t port_aux = (uintptr_t)port;
696 jack_port_id_t myport = (jack_port_id_t)port_aux;
697 if (!CheckPort(myport)) {
698 jack_error(
"jack_port_unset_alias called with an incorrect port %ld", myport);
700 }
else if (name == NULL) {
701 jack_error(
"jack_port_unset_alias called with a NULL port name");
705 return (manager ? manager->GetPort(myport)->UnsetAlias(name) : -1);
711 JackGlobals::CheckContext(
"jack_port_get_aliases");
713 uintptr_t port_aux = (uintptr_t)port;
714 jack_port_id_t myport = (jack_port_id_t)port_aux;
715 if (!CheckPort(myport)) {
716 jack_error(
"jack_port_get_aliases called with an incorrect port %ld", myport);
720 return (manager ? manager->GetPort(myport)->GetAliases(aliases) : -1);
726 JackGlobals::CheckContext(
"jack_port_request_monitor");
728 uintptr_t port_aux = (uintptr_t)port;
729 jack_port_id_t myport = (jack_port_id_t)port_aux;
730 if (!CheckPort(myport)) {
731 jack_error(
"jack_port_request_monitor called with an incorrect port %ld", myport);
741 JackGlobals::CheckContext(
"jack_port_request_monitor_by_name");
744 if (client == NULL) {
745 jack_error(
"jack_port_request_monitor_by_name called with a NULL client");
751 jack_port_id_t myport = manager->GetPort(port_name);
752 if (!CheckPort(myport)) {
753 jack_error(
"jack_port_request_monitor_by_name called with an incorrect port %s", port_name);
763 JackGlobals::CheckContext(
"jack_port_ensure_monitor");
765 uintptr_t port_aux = (uintptr_t)port;
766 jack_port_id_t myport = (jack_port_id_t)port_aux;
767 if (!CheckPort(myport)) {
768 jack_error(
"jack_port_ensure_monitor called with an incorrect port %ld", myport);
772 return (manager ? manager->GetPort(myport)->
EnsureMonitor(onoff) : -1);
778 JackGlobals::CheckContext(
"jack_port_monitoring_input");
780 uintptr_t port_aux = (uintptr_t)port;
781 jack_port_id_t myport = (jack_port_id_t)port_aux;
782 if (!CheckPort(myport)) {
783 jack_error(
"jack_port_monitoring_input called with an incorrect port %ld", myport);
787 return (manager ? manager->GetPort(myport)->MonitoringInput() : -1);
791 LIB_EXPORT
int jack_is_realtime(jack_client_t* ext_client)
793 JackGlobals::CheckContext(
"jack_is_realtime");
796 if (client == NULL) {
797 jack_error(
"jack_is_realtime called with a NULL client");
801 return (control ? control->fRealTime : -1);
805 LIB_EXPORT
void jack_on_shutdown(jack_client_t* ext_client, JackShutdownCallback callback,
void* arg)
807 JackGlobals::CheckContext(
"jack_on_shutdown");
810 if (client == NULL) {
811 jack_error(
"jack_on_shutdown called with a NULL client");
813 client->OnShutdown(callback, arg);
819 JackGlobals::CheckContext(
"jack_on_info_shutdown");
822 if (client == NULL) {
823 jack_error(
"jack_on_info_shutdown called with a NULL client");
825 client->OnInfoShutdown(callback, arg);
831 JackGlobals::CheckContext(
"jack_set_process_callback");
834 if (client == NULL) {
835 jack_error(
"jack_set_process_callback called with a NULL client");
838 return client->SetProcessCallback(callback, arg);
844 JackGlobals::CheckContext(
"jack_thread_wait");
847 if (client == NULL) {
848 jack_error(
"jack_thread_wait called with a NULL client");
851 jack_error(
"jack_thread_wait: deprecated, use jack_cycle_wait/jack_cycle_signal");
858 JackGlobals::CheckContext(
"jack_cycle_wait");
861 if (client == NULL) {
862 jack_error(
"jack_cycle_wait called with a NULL client");
865 return client->CycleWait();
871 JackGlobals::CheckContext(
"jack_cycle_signal");
874 if (client == NULL) {
875 jack_error(
"jack_cycle_signal called with a NULL client");
877 client->CycleSignal(status);
883 JackGlobals::CheckContext(
"jack_set_process_thread");
886 if (client == NULL) {
887 jack_error(
"jack_set_process_thread called with a NULL client");
890 return client->SetProcessThread(fun, arg);
896 JackGlobals::CheckContext(
"jack_set_freewheel_callback");
899 if (client == NULL) {
900 jack_error(
"jack_set_freewheel_callback called with a NULL client");
903 return client->SetFreewheelCallback(freewheel_callback, arg);
909 JackGlobals::CheckContext(
"jack_set_freewheel");
912 if (client == NULL) {
913 jack_error(
"jack_set_freewheel called with a NULL client");
916 return client->SetFreeWheel(onoff);
922 JackGlobals::CheckContext(
"jack_set_buffer_size");
925 if (client == NULL) {
926 jack_error(
"jack_set_buffer_size called with a NULL client");
928 }
else if (!CheckBufferSize(buffer_size)) {
931 return client->SetBufferSize(buffer_size);
937 JackGlobals::CheckContext(
"jack_set_buffer_size_callback");
940 if (client == NULL) {
941 jack_error(
"jack_set_buffer_size_callback called with a NULL client");
944 return client->SetBufferSizeCallback(bufsize_callback, arg);
950 JackGlobals::CheckContext(
"jack_set_sample_rate_callback");
953 if (client == NULL) {
954 jack_error(
"jack_set_sample_rate_callback called with a NULL client");
957 return client->SetSampleRateCallback(srate_callback, arg);
963 JackGlobals::CheckContext(
"jack_set_client_registration_callback");
966 if (client == NULL) {
967 jack_error(
"jack_set_client_registration_callback called with a NULL client");
970 return client->SetClientRegistrationCallback(registration_callback, arg);
976 JackGlobals::CheckContext(
"jack_set_port_registration_callback");
979 if (client == NULL) {
980 jack_error(
"jack_set_port_registration_callback called with a NULL client");
983 return client->SetPortRegistrationCallback(registration_callback, arg);
989 JackGlobals::CheckContext(
"jack_set_port_connect_callback");
992 if (client == NULL) {
993 jack_error(
"jack_set_port_connect_callback called with a NULL client");
996 return client->SetPortConnectCallback(portconnect_callback, arg);
1002 JackGlobals::CheckContext(
"jack_set_port_rename_callback");
1005 if (client == NULL) {
1006 jack_error(
"jack_set_port_rename_callback called with a NULL client");
1009 return client->SetPortRenameCallback(rename_callback, arg);
1015 JackGlobals::CheckContext(
"jack_set_graph_order_callback");
1018 jack_log(
"jack_set_graph_order_callback ext_client %x client %x ", ext_client, client);
1019 if (client == NULL) {
1020 jack_error(
"jack_set_graph_order_callback called with a NULL client");
1023 return client->SetGraphOrderCallback(graph_callback, arg);
1029 JackGlobals::CheckContext(
"jack_set_xrun_callback");
1032 if (client == NULL) {
1033 jack_error(
"jack_set_xrun_callback called with a NULL client");
1036 return client->SetXRunCallback(xrun_callback, arg);
1040 LIB_EXPORT
int jack_set_latency_callback(jack_client_t* ext_client, JackLatencyCallback latency_callback,
void *arg)
1042 JackGlobals::CheckContext(
"jack_set_latency_callback");
1045 if (client == NULL) {
1046 jack_error(
"jack_set_latency_callback called with a NULL client");
1049 return client->SetLatencyCallback(latency_callback, arg);
1055 JackGlobals::CheckContext(
"jack_set_thread_init_callback");
1058 jack_log(
"jack_set_thread_init_callback ext_client %x client %x ", ext_client, client);
1059 if (client == NULL) {
1060 jack_error(
"jack_set_thread_init_callback called with a NULL client");
1063 return client->SetInitCallback(init_callback, arg);
1069 JackGlobals::CheckContext(
"jack_activate");
1072 if (client == NULL) {
1073 jack_error(
"jack_activate called with a NULL client");
1082 JackGlobals::CheckContext(
"jack_deactivate");
1085 if (client == NULL) {
1086 jack_error(
"jack_deactivate called with a NULL client");
1093 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)
1095 JackGlobals::CheckContext(
"jack_port_register");
1098 if (client == NULL) {
1099 jack_error(
"jack_port_register called with a NULL client");
1101 }
else if ((port_name == NULL) || (port_type == NULL)) {
1102 jack_error(
"jack_port_register called with a NULL port name or a NULL port_type");
1105 return (jack_port_t *)((uintptr_t)client->PortRegister(port_name, port_type, flags, buffer_size));
1111 JackGlobals::CheckContext(
"jack_port_unregister");
1114 if (client == NULL) {
1115 jack_error(
"jack_port_unregister called with a NULL client");
1118 uintptr_t port_aux = (uintptr_t)port;
1119 jack_port_id_t myport = (jack_port_id_t)port_aux;
1120 if (!CheckPort(myport)) {
1121 jack_error(
"jack_port_unregister called with an incorrect port %ld", myport);
1124 return client->PortUnRegister(myport);
1129 JackGlobals::CheckContext(
"jack_port_is_mine");
1132 if (client == NULL) {
1133 jack_error(
"jack_port_is_mine called with a NULL client");
1136 uintptr_t port_aux = (uintptr_t)port;
1137 jack_port_id_t myport = (jack_port_id_t)port_aux;
1138 if (!CheckPort(myport)) {
1139 jack_error(
"jack_port_is_mine called with an incorrect port %ld", myport);
1142 return client->PortIsMine(myport);
1147 JackGlobals::CheckContext(
"jack_port_get_connections");
1149 uintptr_t port_aux = (uintptr_t)port;
1150 jack_port_id_t myport = (jack_port_id_t)port_aux;
1151 if (!CheckPort(myport)) {
1152 jack_error(
"jack_port_get_connections called with an incorrect port %ld", myport);
1157 return (manager ? manager->GetConnections(myport) : NULL);
1164 JackGlobals::CheckContext(
"jack_port_get_all_connections");
1167 if (client == NULL) {
1168 jack_error(
"jack_port_get_all_connections called with a NULL client");
1172 uintptr_t port_aux = (uintptr_t)port;
1173 jack_port_id_t myport = (jack_port_id_t)port_aux;
1174 if (!CheckPort(myport)) {
1175 jack_error(
"jack_port_get_all_connections called with an incorrect port %ld", myport);
1180 return (manager ? manager->GetConnections(myport) : NULL);
1186 JackGlobals::CheckContext(
"jack_port_get_total_latency");
1189 if (client == NULL) {
1190 jack_error(
"jack_port_get_total_latency called with a NULL client");
1194 uintptr_t port_aux = (uintptr_t)port;
1195 jack_port_id_t myport = (jack_port_id_t)port_aux;
1196 if (!CheckPort(myport)) {
1197 jack_error(
"jack_port_get_total_latency called with an incorrect port %ld", myport);
1203 manager->ComputeTotalLatency(myport);
1204 return manager->GetPort(myport)->GetTotalLatency();
1211 LIB_EXPORT
int jack_connect(jack_client_t* ext_client,
const char* src,
const char* dst)
1213 JackGlobals::CheckContext(
"jack_connect");
1216 if (client == NULL) {
1217 jack_error(
"jack_connect called with a NULL client");
1219 }
else if ((src == NULL) || (dst == NULL)) {
1220 jack_error(
"jack_connect called with a NULL port name");
1223 return client->PortConnect(src, dst);
1227 LIB_EXPORT
int jack_disconnect(jack_client_t* ext_client,
const char* src,
const char* dst)
1229 JackGlobals::CheckContext(
"jack_disconnect");
1232 if (client == NULL) {
1233 jack_error(
"jack_disconnect called with a NULL client");
1235 }
else if ((src == NULL) || (dst == NULL)) {
1236 jack_error(
"jack_disconnect called with a NULL port name");
1239 return client->PortDisconnect(src, dst);
1245 JackGlobals::CheckContext(
"jack_port_disconnect");
1248 if (client == NULL) {
1249 jack_error(
"jack_port_disconnect called with a NULL client");
1252 uintptr_t port_aux = (uintptr_t)src;
1253 jack_port_id_t myport = (jack_port_id_t)port_aux;
1254 if (!CheckPort(myport)) {
1255 jack_error(
"jack_port_disconnect called with an incorrect port %ld", myport);
1258 return client->PortDisconnect(myport);
1263 JackGlobals::CheckContext(
"jack_get_sample_rate");
1266 if (client == NULL) {
1267 jack_error(
"jack_get_sample_rate called with a NULL client");
1271 return (control ? control->fSampleRate : 0);
1277 JackGlobals::CheckContext(
"jack_get_buffer_size");
1280 if (client == NULL) {
1281 jack_error(
"jack_get_buffer_size called with a NULL client");
1285 return (control ? control->fBufferSize : 0);
1289 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)
1291 JackGlobals::CheckContext(
"jack_get_ports");
1294 if (client == NULL) {
1295 jack_error(
"jack_get_ports called with a NULL client");
1299 return (manager ? manager->GetPorts(port_name_pattern, type_name_pattern, flags) : NULL);
1304 JackGlobals::CheckContext(
"jack_port_by_name");
1307 if (client == NULL) {
1308 jack_error(
"jack_port_by_name called with a NULL client");
1312 if (portname == NULL) {
1313 jack_error(
"jack_port_by_name called with a NULL port name");
1319 int res = manager->GetPort(portname);
1320 return (res == NO_PORT) ? NULL : (jack_port_t*)((uintptr_t)res);
1328 JackGlobals::CheckContext(
"jack_port_by_id");
1331 return (jack_port_t*)((uintptr_t)
id);
1336 JackGlobals::CheckContext(
"jack_engine_takeover_timebase");
1339 if (client == NULL) {
1340 jack_error(
"jack_engine_takeover_timebase called with a NULL client");
1343 jack_error(
"jack_engine_takeover_timebase: deprecated\n");
1350 JackGlobals::CheckContext(
"jack_frames_since_cycle_start");
1355 control->ReadFrameTime(&timer);
1356 return timer.FramesSinceCycleStart(GetMicroSeconds(), control->fSampleRate);
1364 JackGlobals::CheckContext(
"jack_get_time");
1366 return GetMicroSeconds();
1371 JackGlobals::CheckContext(
"jack_frames_to_time");
1374 if (client == NULL) {
1375 jack_error(
"jack_frames_to_time called with a NULL client");
1381 control->ReadFrameTime(&timer);
1382 return timer.Frames2Time(frames, control->fBufferSize);
1391 JackGlobals::CheckContext(
"jack_time_to_frames");
1394 if (client == NULL) {
1395 jack_error(
"jack_time_to_frames called with a NULL client");
1401 control->ReadFrameTime(&timer);
1402 return timer.Time2Frames(usecs, control->fBufferSize);
1411 JackGlobals::CheckContext(
"jack_frame_time");
1418 JackGlobals::CheckContext(
"jack_last_frame_time");
1421 return (control) ? control->fFrameTimer.
ReadCurrentState()->CurFrame() : 0;
1425 jack_nframes_t *current_frames,
1426 jack_time_t *current_usecs,
1427 jack_time_t *next_usecs,
1428 float *period_usecs)
1430 JackGlobals::CheckContext(
"jack_get_cycle_times");
1435 control->ReadFrameTime(&timer);
1436 return timer.GetCycleTimes(current_frames, current_usecs, next_usecs, period_usecs);
1444 JackGlobals::CheckContext(
"jack_cpu_load");
1447 if (client == NULL) {
1448 jack_error(
"jack_cpu_load called with a NULL client");
1452 return (control ? control->fCPULoad : 0.0f);
1458 JackGlobals::CheckContext(
"jack_client_thread_id");
1461 if (client == NULL) {
1462 jack_error(
"jack_client_thread_id called with a NULL client");
1463 return (jack_native_thread_t)NULL;
1465 return client->GetThreadID();
1471 JackGlobals::CheckContext(
"jack_get_client_name");
1474 if (client == NULL) {
1475 jack_error(
"jack_get_client_name called with a NULL client");
1478 return client->GetClientControl()->fName;
1484 return JACK_CLIENT_NAME_SIZE+1;
1489 return REAL_JACK_PORT_NAME_SIZE+1;
1494 return JACK_PORT_TYPE_SIZE;
1499 JackGlobals::CheckContext(
"jack_port_type_get_buffer_size");
1502 if (client == NULL) {
1503 jack_error(
"jack_port_type_get_buffer_size called with a NULL client");
1506 jack_port_type_id_t port_id = GetPortTypeId(port_type);
1507 if (port_id == PORT_TYPES_MAX) {
1508 jack_error(
"jack_port_type_get_buffer_size called with an unknown port type = %s", port_type);
1511 return GetPortType(port_id)->size();
1519 JackGlobals::CheckContext(
"jack_release_timebase");
1522 if (client == NULL) {
1523 jack_error(
"jack_release_timebase called with a NULL client");
1526 return client->ReleaseTimebase();
1532 JackGlobals::CheckContext(
"jack_set_sync_callback");
1535 if (client == NULL) {
1536 jack_error(
"jack_set_sync_callback called with a NULL client");
1539 return client->SetSyncCallback(sync_callback, arg);
1545 JackGlobals::CheckContext(
"jack_set_sync_timeout");
1548 if (client == NULL) {
1549 jack_error(
"jack_set_sync_timeout called with a NULL client");
1552 return client->SetSyncTimeout(timeout);
1558 JackGlobals::CheckContext(
"jack_set_timebase_callback");
1561 if (client == NULL) {
1562 jack_error(
"jack_set_timebase_callback called with a NULL client");
1565 return client->SetTimebaseCallback(conditional, timebase_callback, arg);
1571 JackGlobals::CheckContext(
"jack_transport_locate");
1574 if (client == NULL) {
1575 jack_error(
"jack_transport_locate called with a NULL client");
1578 client->TransportLocate(frame);
1585 JackGlobals::CheckContext(
"jack_transport_query");
1588 if (client == NULL) {
1589 jack_error(
"jack_transport_query called with a NULL client");
1590 return JackTransportStopped;
1592 return client->TransportQuery(pos);
1598 JackGlobals::CheckContext(
"jack_get_current_transport_frame");
1601 if (client == NULL) {
1602 jack_error(
"jack_get_current_transport_frame called with a NULL client");
1605 return client->GetCurrentTransportFrame();
1611 JackGlobals::CheckContext(
"jack_transport_reposition");
1614 if (client == NULL) {
1615 jack_error(
"jack_transport_reposition called with a NULL client");
1618 client->TransportReposition(pos);
1625 JackGlobals::CheckContext(
"jack_transport_start");
1628 if (client == NULL) {
1629 jack_error(
"jack_transport_start called with a NULL client");
1631 client->TransportStart();
1637 JackGlobals::CheckContext(
"jack_transport_stop");
1640 if (client == NULL) {
1641 jack_error(
"jack_transport_stop called with a NULL client");
1643 client->TransportStop();
1650 JackGlobals::CheckContext(
"jack_get_transport_info");
1652 jack_error(
"jack_get_transport_info: deprecated");
1659 JackGlobals::CheckContext(
"jack_set_transport_info");
1661 jack_error(
"jack_set_transport_info: deprecated");
1667 LIB_EXPORT
float jack_get_max_delayed_usecs(jack_client_t* ext_client)
1669 JackGlobals::CheckContext(
"jack_get_max_delayed_usecs");
1672 if (client == NULL) {
1673 jack_error(
"jack_get_max_delayed_usecs called with a NULL client");
1677 return (control ? control->fMaxDelayedUsecs : 0.f);
1681 LIB_EXPORT
float jack_get_xrun_delayed_usecs(jack_client_t* ext_client)
1683 JackGlobals::CheckContext(
"jack_get_xrun_delayed_usecs");
1686 if (client == NULL) {
1687 jack_error(
"jack_get_xrun_delayed_usecs called with a NULL client");
1691 return (control ? control->fXrunDelayedUsecs : 0.f);
1695 LIB_EXPORT
void jack_reset_max_delayed_usecs(jack_client_t* ext_client)
1697 JackGlobals::CheckContext(
"jack_reset_max_delayed_usecs");
1700 if (client == NULL) {
1701 jack_error(
"jack_reset_max_delayed_usecs called with a NULL client");
1704 control->ResetXRun();
1711 JackGlobals::CheckContext(
"jack_client_real_time_priority");
1714 if (client == NULL) {
1715 jack_error(
"jack_client_real_time_priority called with a NULL client");
1719 return (control->fRealTime) ? control->fClientPriority : -1;
1725 JackGlobals::CheckContext(
"jack_client_max_real_time_priority");
1728 if (client == NULL) {
1729 jack_error(
"jack_client_max_real_time_priority called with a NULL client");
1733 return (control->fRealTime) ? control->fMaxClientPriority : -1;
1741 ? JackThread::AcquireRealTimeImp(thread, priority, control->fPeriod, control->fComputation, control->fConstraint)
1746 jack_native_thread_t *thread,
1749 thread_routine routine,
1752 JackGlobals::CheckContext(
"jack_client_create_thread");
1755 int res = JackThread::StartImp(thread, priority, realtime, routine, arg);
1757 ? ((realtime ? JackThread::AcquireRealTimeImp(*thread, priority, control->fPeriod, control->fComputation, control->fConstraint) : res))
1763 return JackThread::DropRealTimeImp(thread);
1768 JackGlobals::CheckContext(
"jack_client_stop_thread");
1769 return JackThread::StopImp(thread);
1774 JackGlobals::CheckContext(
"jack_client_kill_thread");
1775 return JackThread::KillImp(thread);
1782 JackGlobals::fJackThreadCreator = pthread_create;
1784 JackGlobals::fJackThreadCreator = jtc;
1791 const char* load_name,
1792 const char* load_init)
1794 JackGlobals::CheckContext(
"jack_internal_client_new");
1795 jack_error(
"jack_internal_client_new: deprecated");
1801 JackGlobals::CheckContext(
"jack_internal_client_close");
1802 jack_error(
"jack_internal_client_close: deprecated");
1805 LIB_EXPORT
char* jack_get_internal_client_name(jack_client_t* ext_client, jack_intclient_t intclient)
1807 JackGlobals::CheckContext(
"jack_get_internal_client_name");
1810 if (client == NULL) {
1811 jack_error(
"jack_get_internal_client_name called with a NULL client");
1813 }
else if (intclient >= CLIENT_NUM) {
1814 jack_error(
"jack_get_internal_client_name: incorrect client");
1817 return client->GetInternalClientName(intclient);
1821 LIB_EXPORT jack_intclient_t jack_internal_client_handle(jack_client_t* ext_client,
const char* client_name, jack_status_t* status)
1823 JackGlobals::CheckContext(
"jack_internal_client_handle");
1826 if (client == NULL) {
1827 jack_error(
"jack_internal_client_handle called with a NULL client");
1830 jack_status_t my_status;
1832 status = &my_status;
1833 *status = (jack_status_t)0;
1834 return client->InternalClientHandle(client_name, status);
1838 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)
1840 JackGlobals::CheckContext(
"jack_internal_client_load_aux");
1843 if (client == NULL) {
1844 jack_error(
"jack_internal_client_load called with a NULL client");
1848 jack_status_t my_status;
1851 status = &my_status;
1852 *status = (jack_status_t)0;
1855 if ((options & ~JackLoadOptions)) {
1856 int my_status1 = *status | (JackFailure | JackInvalidOption);
1857 *status = (jack_status_t)my_status1;
1862 jack_varargs_parse(options, ap, &va);
1863 return client->InternalClientLoad(client_name, options, status, &va);
1867 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, ...)
1869 JackGlobals::CheckContext(
"jack_internal_client_load");
1872 va_start(ap, status);
1873 jack_intclient_t res = jack_internal_client_load_aux(client, client_name, options, status, ap);
1878 LIB_EXPORT jack_status_t jack_internal_client_unload(jack_client_t* ext_client, jack_intclient_t intclient)
1880 JackGlobals::CheckContext(
"jack_internal_client_load");
1883 if (client == NULL) {
1884 jack_error(
"jack_internal_client_unload called with a NULL client");
1885 return (jack_status_t)(JackNoSuchClient | JackFailure);
1886 }
else if (intclient >= CLIENT_NUM) {
1887 jack_error(
"jack_internal_client_unload: incorrect client");
1888 return (jack_status_t)(JackNoSuchClient | JackFailure);
1890 jack_status_t my_status;
1891 client->InternalClientUnload(intclient, &my_status);
1896 LIB_EXPORT
void jack_get_version(
int *major_ptr,
1901 JackGlobals::CheckContext(
"jack_get_version");
1910 LIB_EXPORT
const char* jack_get_version_string()
1912 JackGlobals::CheckContext(
"jack_get_version_string");
1916 LIB_EXPORT
void jack_free(
void* ptr)
1918 JackGlobals::CheckContext(
"jack_free");
1928 JackGlobals::CheckContext(
"jack_set_session_callback");
1931 jack_log(
"jack_set_session_callback ext_client %x client %x ", ext_client, client);
1932 if (client == NULL) {
1933 jack_error(
"jack_set_session_callback called with a NULL client");
1936 return client->SetSessionCallback(session_callback, arg);
1942 JackGlobals::CheckContext(
"jack_session_notify");
1945 jack_log(
"jack_session_notify ext_client %x client %x ", ext_client, client);
1946 if (client == NULL) {
1947 jack_error(
"jack_session_notify called with a NULL client");
1950 return client->SessionNotify(target, ev_type, path);
1956 JackGlobals::CheckContext(
"jack_session_reply");
1959 jack_log(
"jack_session_reply ext_client %x client %x ", ext_client, client);
1960 if (client == NULL) {
1961 jack_error(
"jack_session_reply called with a NULL client");
1964 return client->SessionReply(event);
1970 JackGlobals::CheckContext(
"jack_session_event_free");
1985 JackGlobals::CheckContext(
"jack_client_get_uuid");
1988 if (client == NULL) {
1989 jack_error(
"jack_client_get_uuid called with a NULL client");
1993 snprintf(retval,
sizeof(retval),
"%d", client->GetClientControl()->fSessionID);
1994 return strdup(retval);
2000 JackGlobals::CheckContext(
"jack_get_uuid_for_client_name");
2003 jack_log(
"jack_get_uuid_for_client_name ext_client %x client %x ", ext_client, client);
2004 if (client == NULL) {
2005 jack_error(
"jack_get_uuid_for_client_name called with a NULL client");
2008 return client->GetUUIDForClientName(client_name);
2014 JackGlobals::CheckContext(
"jack_get_client_name_by_uuid");
2017 jack_log(
"jack_get_uuid_for_client_name ext_client %x client %x ", ext_client, client);
2018 if (client == NULL) {
2019 jack_error(
"jack_get_client_name_by_uuid called with a NULL client");
2022 return client->GetClientNameByUUID(client_uuid);
2028 JackGlobals::CheckContext(
"jack_reserve_client_name");
2031 jack_log(
"jack_reserve_client_name ext_client %x client %x ", ext_client, client);
2032 if (client == NULL) {
2033 jack_error(
"jack_reserve_client_name called with a NULL client");
2036 return client->ReserveClientName(client_name, uuid);
2042 JackGlobals::CheckContext(
"jack_session_commands_free");
2051 if (cmds[i].client_name) {
2052 free ((
char *)cmds[i].client_name);
2054 if (cmds[i].command) {
2055 free ((
char *)cmds[i].command);
2058 free ((
char *)cmds[i].uuid);
2071 JackGlobals::CheckContext(
"jack_client_has_session_callback");
2074 jack_log(
"jack_client_has_session_callback ext_client %x client %x ", ext_client, client);
2075 if (client == NULL) {
2076 jack_error(
"jack_client_has_session_callback called with a NULL client");
2079 return client->ClientHasSessionCallback(client_name);
2083 LIB_EXPORT
int jack_set_property(jack_client_t*, jack_uuid_t,
const char*,
const char*,
const char*)
2127 LIB_EXPORT jack_uuid_t jack_client_uuid_generate()
2132 LIB_EXPORT jack_uuid_t jack_port_uuid_generate(uint32_t)
2137 LIB_EXPORT uint32_t jack_uuid_to_index(jack_uuid_t)
2142 LIB_EXPORT
int jack_uuid_compare(jack_uuid_t, jack_uuid_t)
2147 LIB_EXPORT
void jack_uuid_copy(jack_uuid_t*, jack_uuid_t)
2151 LIB_EXPORT
void jack_uuid_clear(jack_uuid_t*)
2155 LIB_EXPORT
int jack_uuid_parse(
const char*, jack_uuid_t*)
2160 LIB_EXPORT
void jack_uuid_unparse(jack_uuid_t,
char buf[JACK_UUID_STRING_SIZE])
2164 LIB_EXPORT
int jack_uuid_empty(jack_uuid_t)
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 *)
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 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)
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.
SERVER_EXPORT void(* jack_info_callback)(const char *desc)
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 char * jack_get_client_name_by_uuid(jack_client_t *ext_client, const char *client_uuid)
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 jack_uuid_t jack_port_uuid(const jack_port_t *)
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)
SERVER_EXPORT void(* jack_error_callback)(const char *desc)
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 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_time_t jack_get_time()
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 int jack_port_set_name(jack_port_t *port, const char *port_name)
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 char * jack_get_uuid_for_client_name(jack_client_t *ext_client, const char *client_name)
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 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 int jack_port_rename(jack_client_t *client, jack_port_t *port, const char *port_name)
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)