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/transport.h>
00032
00040 jack_client_t *jack_client_new (const char *client_name);
00041
00047 int jack_client_close (jack_client_t *client);
00048
00056 int jack_internal_client_new (const char *client_name, const char *so_name, const char *so_data);
00057
00063 void jack_internal_client_close (const char *client_name);
00064
00072 int jack_is_realtime (jack_client_t *client);
00073
00092 void jack_on_shutdown (jack_client_t *client, void (*function)(void *arg), void *arg);
00093
00109 int jack_set_process_callback (jack_client_t *client,
00110 JackProcessCallback process_callback,
00111 void *arg);
00112
00131 int jack_set_freewheel(jack_client_t* client, int onoff);
00132
00148 int jack_set_buffer_size (jack_client_t *client, jack_nframes_t nframes);
00149
00162 int jack_set_buffer_size_callback (jack_client_t *client,
00163 JackBufferSizeCallback bufsize_callback,
00164 void *arg);
00165
00172 int jack_set_sample_rate_callback (jack_client_t *client,
00173 JackSampleRateCallback srate_callback,
00174 void *arg);
00175
00182 int jack_set_port_registration_callback (jack_client_t *, JackPortRegistrationCallback registration_callback, void *arg);
00183
00190 int jack_set_graph_order_callback (jack_client_t *, JackGraphOrderCallback graph_callback, void *);
00191
00198 int jack_set_xrun_callback (jack_client_t *, JackXRunCallback xrun_callback, void *arg);
00199
00206 int jack_activate (jack_client_t *client);
00207
00216 int jack_deactivate (jack_client_t *client);
00217
00244 jack_port_t *jack_port_register (jack_client_t *,
00245 const char *port_name,
00246 const char *port_type,
00247 unsigned long flags,
00248 unsigned long buffer_size);
00249
00256 int jack_port_unregister (jack_client_t *, jack_port_t *);
00257
00274 void *jack_port_get_buffer (jack_port_t *, jack_nframes_t);
00275
00279 const char * jack_port_name (const jack_port_t *port);
00280
00284 const char * jack_port_short_name (const jack_port_t *port);
00285
00289 int jack_port_flags (const jack_port_t *port);
00290
00294 const char * jack_port_type (const jack_port_t *port);
00295
00299 int jack_port_is_mine (const jack_client_t *, const jack_port_t *port);
00300
00307 int jack_port_connected (const jack_port_t *port);
00308
00315 int jack_port_connected_to (const jack_port_t *port, const char *portname);
00316
00329 const char ** jack_port_get_connections (const jack_port_t *port);
00330
00349 const char ** jack_port_get_all_connections (const jack_client_t *client, const jack_port_t *port);
00350
00367 int jack_port_tie (jack_port_t *src, jack_port_t *dst);
00368
00376 int jack_port_untie (jack_port_t *port);
00377
00385 int jack_port_lock (jack_client_t *, jack_port_t *);
00386
00392 int jack_port_unlock (jack_client_t *, jack_port_t *);
00393
00405 jack_nframes_t jack_port_get_latency (jack_port_t *port);
00406
00412 jack_nframes_t jack_port_get_total_latency (jack_client_t *, jack_port_t *port);
00413
00424 void jack_port_set_latency (jack_port_t *, jack_nframes_t);
00425
00431 int jack_port_set_name (jack_port_t *port, const char *name);
00432
00438 int jack_port_request_monitor (jack_port_t *port, int onoff);
00439
00447 int jack_port_request_monitor_by_name (jack_client_t *client, const char *port_name, int onoff);
00448
00457 int jack_port_ensure_monitor (jack_port_t *port, int onoff);
00458
00463 int jack_port_monitoring_input (jack_port_t *port);
00464
00478 int jack_connect (jack_client_t *,
00479 const char *source_port,
00480 const char *destination_port);
00481
00491 int jack_disconnect (jack_client_t *,
00492 const char *source_port,
00493 const char *destination_port);
00494
00506 int jack_port_connect (jack_client_t *, jack_port_t *src, jack_port_t *dst);
00507
00517 int jack_port_disconnect (jack_client_t *, jack_port_t *);
00518
00523 jack_nframes_t jack_get_sample_rate (jack_client_t *);
00524
00534 jack_nframes_t jack_get_buffer_size (jack_client_t *);
00535
00550 const char ** jack_get_ports (jack_client_t *,
00551 const char *port_name_pattern,
00552 const char *type_name_pattern,
00553 unsigned long flags);
00554
00559 jack_port_t *jack_port_by_name (jack_client_t *, const char *portname);
00560
00564 jack_port_t *jack_port_by_id (const jack_client_t *client, jack_port_id_t id);
00565
00576 int jack_engine_takeover_timebase (jack_client_t *);
00577
00582 jack_nframes_t jack_frames_since_cycle_start (const jack_client_t *);
00583
00590 jack_nframes_t jack_frame_time (const jack_client_t *);
00591
00599 float jack_cpu_load (jack_client_t *client);
00600
00612 void jack_set_server_dir (const char *path);
00613
00618 pthread_t jack_client_thread_id (jack_client_t *);
00619
00620 extern void (*jack_error_callback)(const char *desc);
00621
00625 void jack_set_error_function (void (*func)(const char *));
00626
00627 #ifdef __cplusplus
00628 }
00629 #endif
00630
00631 #endif
00632
00633