Crudebyte Logo
jack.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2001-2013
3 
4  Developers:
5 
6  Paul Davis
7  Jack O'Quin
8  Steve Harris
9  Rui Nuno Capela
10  Devin Anderson
11  Kai Vehmanen
12  Ian Esten
13  Dmitry Baikov
14  Torben Hohn
15  Rohan Drape
16  Stephane Letz
17  Christian Schoenebeck
18 
19  This program is free software; you can redistribute it and/or modify
20  it under the terms of the GNU Lesser General Public License as published by
21  the Free Software Foundation; either version 2.1 of the License, or
22  (at your option) any later version.
23 
24  This program is distributed in the hope that it will be useful,
25  but WITHOUT ANY WARRANTY; without even the implied warranty of
26  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27  GNU Lesser General Public License for more details.
28 
29  You should have received a copy of the GNU Lesser General Public License
30  along with this program; if not, write to the Free Software
31  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
32 
33  You are permitted to statically link against a binary version of
34  the JACK library obtained from
35 
36  http://jackaudio.org/downloads/JackiOS-SDK.zip
37 
38  and distribute the resulting application without complying with section 6
39  (requiring recipients of your application to be able to relink against
40  modified versions of libjack).
41 
42  This permission is granted if and ONLY if the resulting application binary
43  issue is intended for execution in any one of the following environments:
44 
45  * Apple Inc. iOS
46 
47  Additional environments may be added to this list in the future.
48  All other terms of the LGPL continue to apply.
49 
50 */
51 
52 #ifndef __jack_h__
53 #define __jack_h__
54 
55 #ifdef __cplusplus
56 extern "C"
57 {
58 #endif
59 
60 #include <jack/systemdeps.h>
61 #include <jack/types.h>
62 #include <jack/transport.h>
63 
89  /*************************************************************
90  * NOTE: JACK_WEAK_EXPORT ***MUST*** be used on every function
91  * added to the JACK API after the 0.116.2 release.
92  *
93  * Functions that predate this release are marked with
94  * JACK_WEAK_OPTIONAL_EXPORT which can be defined at compile
95  * time in a variety of ways. The default definition is empty,
96  * so that these symbols get normal linkage. If you wish to
97  * use all JACK symbols with weak linkage, include
98  * <jack/weakjack.h> before jack.h.
99  *************************************************************/
100 
101 #include <jack/weakmacros.h>
102 
115 void
117  int *major_ptr,
118  int *minor_ptr,
119  int *micro_ptr,
120  int *proto_ptr) JACK_OPTIONAL_WEAK_EXPORT;
121 
128 const char *
129 jack_get_version_string() JACK_OPTIONAL_WEAK_EXPORT;
130 
189 jack_client_t * jack_client_open (const char *client_name,
190  jack_options_t options,
191  jack_status_t *status, ...) JACK_OPTIONAL_WEAK_EXPORT;
192 
199 jack_client_t * jack_client_new (const char *client_name) JACK_OPTIONAL_WEAK_DEPRECATED_EXPORT;
200 
206 int jack_client_close (jack_client_t *client) JACK_OPTIONAL_WEAK_EXPORT;
207 
212 int jack_client_name_size (void) JACK_OPTIONAL_WEAK_EXPORT;
213 
220 char * jack_get_client_name (jack_client_t *client) JACK_OPTIONAL_WEAK_EXPORT;
221 
243 int jack_internal_client_new (const char *client_name,
244  const char *load_name,
245  const char *load_init) JACK_OPTIONAL_WEAK_DEPRECATED_EXPORT;
246 
252 void jack_internal_client_close (const char *client_name) JACK_OPTIONAL_WEAK_DEPRECATED_EXPORT;
253 
260 int jack_activate (jack_client_t *client) JACK_OPTIONAL_WEAK_EXPORT;
261 
269 int jack_deactivate (jack_client_t *client) JACK_OPTIONAL_WEAK_EXPORT;
270 
274 int jack_get_client_pid (const char *name) JACK_OPTIONAL_WEAK_EXPORT;
275 
280 jack_native_thread_t jack_client_thread_id (jack_client_t *client) JACK_OPTIONAL_WEAK_EXPORT;
281 
291 int jack_is_realtime (jack_client_t *client) JACK_OPTIONAL_WEAK_EXPORT;
292 
307 int jack_gui_switch_to_client (jack_client_t *client, const char *client_name) JACK_OPTIONAL_WEAK_EXPORT;
308 
342 int jack_app_register (jack_register_flags_t flags) JACK_OPTIONAL_WEAK_EXPORT;
343 
357 bool jack_server_installed () JACK_OPTIONAL_WEAK_EXPORT;
358 
365 bool jack_server_running () JACK_OPTIONAL_WEAK_EXPORT;
366 
402 jack_nframes_t jack_thread_wait (jack_client_t *client, int status) JACK_OPTIONAL_WEAK_EXPORT;
403 
411 jack_nframes_t jack_cycle_wait (jack_client_t* client) JACK_OPTIONAL_WEAK_EXPORT;
412 
419 void jack_cycle_signal (jack_client_t* client, int status) JACK_OPTIONAL_WEAK_EXPORT;
420 
435 int jack_set_process_thread(jack_client_t* client, JackThreadCallback thread_callback, void *arg) JACK_OPTIONAL_WEAK_EXPORT;
436 
472  JackThreadInitCallback thread_init_callback,
473  void *arg) JACK_OPTIONAL_WEAK_EXPORT;
474 
508 void jack_on_shutdown (jack_client_t *client,
509  JackShutdownCallback shutdown_callback, void *arg) JACK_OPTIONAL_WEAK_EXPORT;
510 
539  JackInfoShutdownCallback shutdown_callback, void *arg) JACK_WEAK_EXPORT;
540 
557  JackProcessCallback process_callback,
558  void *arg) JACK_OPTIONAL_WEAK_EXPORT;
559 
577  JackFreewheelCallback freewheel_callback,
578  void *arg) JACK_OPTIONAL_WEAK_EXPORT;
579 
600  JackBufferSizeCallback bufsize_callback,
601  void *arg) JACK_OPTIONAL_WEAK_EXPORT;
602 
617  JackSampleRateCallback srate_callback,
618  void *arg) JACK_OPTIONAL_WEAK_EXPORT;
619 
635  registration_callback, void *arg) JACK_OPTIONAL_WEAK_EXPORT;
636 
652  registration_callback, void *arg) JACK_OPTIONAL_WEAK_EXPORT;
653 
669  connect_callback, void *arg) JACK_OPTIONAL_WEAK_EXPORT;
670 
686  rename_callback, void *arg) JACK_OPTIONAL_WEAK_EXPORT;
687 
702  JackGraphOrderCallback graph_callback,
703  void *) JACK_OPTIONAL_WEAK_EXPORT;
704 
719  JackXRunCallback xrun_callback, void *arg) JACK_OPTIONAL_WEAK_EXPORT;
720 
777  JackLatencyCallback latency_callback,
778  void *) JACK_WEAK_EXPORT;
820 int jack_set_freewheel(jack_client_t* client, int onoff) JACK_OPTIONAL_WEAK_EXPORT;
821 
837 int jack_set_buffer_size (jack_client_t *client, jack_nframes_t nframes) JACK_OPTIONAL_WEAK_EXPORT;
838 
843 jack_nframes_t jack_get_sample_rate (jack_client_t *) JACK_OPTIONAL_WEAK_EXPORT;
844 
854 jack_nframes_t jack_get_buffer_size (jack_client_t *) JACK_OPTIONAL_WEAK_EXPORT;
855 
866 int jack_engine_takeover_timebase (jack_client_t *) JACK_OPTIONAL_WEAK_DEPRECATED_EXPORT;
867 
877 float jack_cpu_load (jack_client_t *client) JACK_OPTIONAL_WEAK_EXPORT;
878 
886 float jack_get_max_cpu_load (jack_client_t *client) JACK_OPTIONAL_WEAK_EXPORT;
887 
895 float jack_set_max_cpu_load (jack_client_t *client, float max_cpu_load) JACK_OPTIONAL_WEAK_EXPORT;
896 
955  const char *port_name,
956  const char *port_type,
957  unsigned long flags,
958  unsigned long buffer_size) JACK_OPTIONAL_WEAK_EXPORT;
959 
966 int jack_port_unregister (jack_client_t *client, jack_port_t *port) JACK_OPTIONAL_WEAK_EXPORT;
967 
987 void * jack_port_get_buffer (jack_port_t *port, jack_nframes_t) JACK_OPTIONAL_WEAK_EXPORT;
988 
995 const char * jack_port_name (const jack_port_t *port) JACK_OPTIONAL_WEAK_EXPORT;
996 
1003 const char * jack_port_short_name (const jack_port_t *port) JACK_OPTIONAL_WEAK_EXPORT;
1004 
1008 int jack_port_flags (const jack_port_t *port) JACK_OPTIONAL_WEAK_EXPORT;
1009 
1014 const char * jack_port_type (const jack_port_t *port) JACK_OPTIONAL_WEAK_EXPORT;
1015 
1019 jack_port_type_id_t jack_port_type_id (const jack_port_t *port) JACK_OPTIONAL_WEAK_EXPORT;
1020 
1024 int jack_port_is_mine (const jack_client_t *client, const jack_port_t *port) JACK_OPTIONAL_WEAK_EXPORT;
1025 
1031 int jack_port_connected (const jack_port_t *port) JACK_OPTIONAL_WEAK_EXPORT;
1032 
1039 int jack_port_connected_to (const jack_port_t *port,
1040  const char *port_name) JACK_OPTIONAL_WEAK_EXPORT;
1041 
1053 const char ** jack_port_get_connections (const jack_port_t *port) JACK_OPTIONAL_WEAK_EXPORT;
1054 
1074 const char ** jack_port_get_all_connections (const jack_client_t *client,
1075  const jack_port_t *port) JACK_OPTIONAL_WEAK_EXPORT;
1076 
1084 int jack_port_tie (jack_port_t *src, jack_port_t *dst) JACK_OPTIONAL_WEAK_DEPRECATED_EXPORT;
1085 
1093 int jack_port_untie (jack_port_t *port) JACK_OPTIONAL_WEAK_DEPRECATED_EXPORT;
1094 
1102 int jack_port_set_name (jack_port_t *port, const char *port_name) JACK_OPTIONAL_WEAK_EXPORT;
1103 
1117 int jack_port_set_alias (jack_port_t *port, const char *alias) JACK_OPTIONAL_WEAK_EXPORT;
1118 
1127 int jack_port_unset_alias (jack_port_t *port, const char *alias) JACK_OPTIONAL_WEAK_EXPORT;
1128 
1134 int jack_port_get_aliases (const jack_port_t *port, char* const aliases[2]) JACK_OPTIONAL_WEAK_EXPORT;
1135 
1140 int jack_port_request_monitor (jack_port_t *port, int onoff) JACK_OPTIONAL_WEAK_EXPORT;
1141 
1151  const char *port_name, int onoff) JACK_OPTIONAL_WEAK_EXPORT;
1152 
1160 int jack_port_ensure_monitor (jack_port_t *port, int onoff) JACK_OPTIONAL_WEAK_EXPORT;
1161 
1165 int jack_port_monitoring_input (jack_port_t *port) JACK_OPTIONAL_WEAK_EXPORT;
1166 
1184 int jack_connect (jack_client_t *client,
1185  const char *source_port,
1186  const char *destination_port) JACK_OPTIONAL_WEAK_EXPORT;
1187 
1201 int jack_disconnect (jack_client_t *client,
1202  const char *source_port,
1203  const char *destination_port) JACK_OPTIONAL_WEAK_EXPORT;
1204 
1214 int jack_port_disconnect (jack_client_t *client, jack_port_t *port) JACK_OPTIONAL_WEAK_EXPORT;
1215 
1224 int jack_port_name_size(void) JACK_OPTIONAL_WEAK_EXPORT;
1225 
1230 int jack_port_type_size(void) JACK_OPTIONAL_WEAK_EXPORT;
1231 
1237 size_t jack_port_type_get_buffer_size (jack_client_t *client, const char *port_type) JACK_WEAK_EXPORT;
1238 
1305 void jack_port_set_latency (jack_port_t *port, jack_nframes_t) JACK_OPTIONAL_WEAK_DEPRECATED_EXPORT;
1306 
1317 
1386 
1400 int jack_recompute_total_latencies (jack_client_t *client) JACK_OPTIONAL_WEAK_EXPORT;
1401 
1417 jack_nframes_t jack_port_get_latency (jack_port_t *port) JACK_OPTIONAL_WEAK_DEPRECATED_EXPORT;
1418 
1430  jack_port_t *port) JACK_OPTIONAL_WEAK_DEPRECATED_EXPORT;
1431 
1448 int jack_recompute_total_latency (jack_client_t*, jack_port_t* port) JACK_OPTIONAL_WEAK_DEPRECATED_EXPORT;
1449 
1481 const char ** jack_get_ports (jack_client_t *client,
1482  const char *port_name_pattern,
1483  const char *type_name_pattern,
1484  unsigned long flags) JACK_OPTIONAL_WEAK_EXPORT;
1485 
1491 jack_port_t * jack_port_by_name (jack_client_t *client, const char *port_name) JACK_OPTIONAL_WEAK_EXPORT;
1492 
1496 jack_port_t * jack_port_by_id (jack_client_t *client,
1497  jack_port_id_t port_id) JACK_OPTIONAL_WEAK_EXPORT;
1498 
1514 jack_nframes_t jack_frames_since_cycle_start (const jack_client_t *) JACK_OPTIONAL_WEAK_EXPORT;
1515 
1522 jack_nframes_t jack_frame_time (const jack_client_t *) JACK_OPTIONAL_WEAK_EXPORT;
1523 
1538 jack_nframes_t jack_last_frame_time (const jack_client_t *client) JACK_OPTIONAL_WEAK_EXPORT;
1539 
1583 int jack_get_cycle_times(const jack_client_t *client,
1584  jack_nframes_t *current_frames,
1585  jack_time_t *current_usecs,
1586  jack_time_t *next_usecs,
1587  float *period_usecs) JACK_OPTIONAL_WEAK_EXPORT;
1588 
1592 jack_time_t jack_frames_to_time(const jack_client_t *client, jack_nframes_t) JACK_OPTIONAL_WEAK_EXPORT;
1593 
1597 jack_nframes_t jack_time_to_frames(const jack_client_t *client, jack_time_t) JACK_OPTIONAL_WEAK_EXPORT;
1598 
1605 jack_time_t jack_get_time() JACK_OPTIONAL_WEAK_EXPORT;
1606 
1619 
1628 extern void (*jack_error_callback)(const char *msg) JACK_OPTIONAL_WEAK_EXPORT;
1629 
1637 void jack_set_error_function (void (*func)(const char *)) JACK_OPTIONAL_WEAK_EXPORT;
1638 
1647 extern void (*jack_info_callback)(const char *msg) JACK_OPTIONAL_WEAK_EXPORT;
1648 
1656 void jack_set_info_function (void (*func)(const char *)) JACK_OPTIONAL_WEAK_EXPORT;
1657 
1667 void jack_free(void* ptr) JACK_OPTIONAL_WEAK_EXPORT;
1668 
1669 
1670 #ifdef __cplusplus
1671 }
1672 #endif
1673 
1674 #endif /* __jack_h__ */
DE • EN
Copyright © MMXIII Crudebyte. All rights reserved.

twitter