00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef __jack_h__
00022 #define __jack_h__
00023
00024 #ifdef __cplusplus
00025 extern "C" {
00026 #endif
00027
00028 #include <pthread.h>
00029
00030 #include <jack/types.h>
00031 #include <jack/error.h>
00032 #include <jack/transport.h>
00033
00041 jack_client_t *jack_client_new (const char *client_name);
00042
00043
00051 jack_client_t *jack_client_new_inprocess (const char *client_name, const char *so_name, const char *so_data);
00052
00056 int jack_client_close (jack_client_t *client);
00057
00076 void jack_on_shutdown (jack_client_t *client, void (*function)(void *arg), void *arg);
00077
00082 int jack_set_process_callback (jack_client_t *, JackProcessCallback process_callback, void *arg);
00083
00089 int jack_set_buffer_size_callback (jack_client_t *, JackBufferSizeCallback bufsize_callback, void *arg);
00090
00095 int jack_set_sample_rate_callback (jack_client_t *, JackSampleRateCallback srate_callback, void *arg);
00096
00101 int jack_set_port_registration_callback (jack_client_t *, JackPortRegistrationCallback registration_callback, void *arg);
00102
00107 int jack_set_graph_order_callback (jack_client_t *, JackGraphOrderCallback graph_callback, void *);
00108
00113 int jack_set_xrun_callback (jack_client_t *, JackXRunCallback xrun_callback, void *arg);
00114
00119 int jack_activate (jack_client_t *client);
00120
00127 int jack_deactivate (jack_client_t *client);
00128
00150 jack_port_t *jack_port_register (jack_client_t *,
00151 const char *port_name,
00152 const char *port_type,
00153 unsigned long flags,
00154 unsigned long buffer_size);
00155
00160 int jack_port_unregister (jack_client_t *, jack_port_t *);
00161
00165 const char * jack_port_name (const jack_port_t *port);
00166
00170 const char * jack_port_short_name (const jack_port_t *port);
00171
00175 int jack_port_flags (const jack_port_t *port);
00176
00180 const char * jack_port_type (const jack_port_t *port);
00181
00185 int jack_port_is_mine (const jack_client_t *, const jack_port_t *port);
00186
00193 int jack_port_connected (const jack_port_t *port);
00194
00201 int jack_port_connected_to (const jack_port_t *port, const char *portname);
00202
00215 const char ** jack_port_get_connections (const jack_port_t *port);
00216
00235 const char ** jack_port_get_all_connections (const jack_client_t *client, const jack_port_t *port);
00236
00240 int jack_port_set_name (jack_port_t *port, const char *name);
00241
00256 void *jack_port_get_buffer (jack_port_t *, jack_nframes_t);
00257
00268 int jack_connect (jack_client_t *,
00269 const char *source_port,
00270 const char *destination_port);
00271
00279 int jack_disconnect (jack_client_t *,
00280 const char *source_port,
00281 const char *destination_port);
00282
00292 int jack_port_connect (jack_client_t *, jack_port_t *src, jack_port_t *dst);
00293
00303 int jack_port_disconnect (jack_client_t *, jack_port_t *);
00304
00319 int jack_port_tie (jack_port_t *src, jack_port_t *dst);
00320
00326 int jack_port_untie (jack_port_t *port);
00327
00333 int jack_port_lock (jack_client_t *, jack_port_t *);
00334
00338 int jack_port_unlock (jack_client_t *, jack_port_t *);
00339
00350 jack_nframes_t jack_port_get_latency (jack_port_t *port);
00351
00357 jack_nframes_t jack_port_get_total_latency (jack_client_t *, jack_port_t *port);
00358
00370 void jack_port_set_latency (jack_port_t *, jack_nframes_t);
00371
00377 int jack_port_request_monitor (jack_port_t *port, int onoff);
00378
00384 int jack_port_request_monitor_by_name (jack_client_t *client, const char *port_name, int onoff);
00385
00392 int jack_port_ensure_monitor (jack_port_t *port, int onoff);
00393
00398 int jack_port_monitoring_input (jack_port_t *port);
00399
00404 unsigned long jack_get_sample_rate (jack_client_t *);
00405
00413 jack_nframes_t jack_get_buffer_size (jack_client_t *);
00414
00430 const char ** jack_get_ports (jack_client_t *,
00431 const char *port_name_pattern,
00432 const char *type_name_pattern,
00433 unsigned long flags);
00434
00439 jack_port_t *jack_port_by_name (jack_client_t *, const char *portname);
00440
00444 jack_port_t *jack_port_by_id (const jack_client_t *client, jack_port_id_t id);
00445
00453 int jack_engine_takeover_timebase (jack_client_t *);
00454
00458 void jack_update_time (jack_client_t *, jack_nframes_t);
00459
00465 jack_nframes_t jack_frames_since_cycle_start (const jack_client_t *);
00466
00473 jack_nframes_t jack_frame_time (const jack_client_t *);
00474
00482 float jack_cpu_load (jack_client_t *client);
00483
00492 void jack_set_server_dir (const char *path);
00493
00504 int jack_add_alias (jack_client_t *, const char *portname, const char *alias);
00505
00513 int jack_remove_alias (jack_client_t *, const char *alias);
00514
00520 pthread_t jack_client_thread_id (jack_client_t *);
00521
00522 #ifdef __cplusplus
00523 }
00524 #endif
00525
00526 #endif
00527