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
00048 int jack_client_close (jack_client_t *client);
00049
00057 int jack_internal_client_new (const char *client_name, const char *so_name, const char *so_data);
00058
00064 void jack_internal_client_close (const char *client_name);
00065
00073 int jack_is_realtime (jack_client_t *client);
00074
00093 void jack_on_shutdown (jack_client_t *client, void (*function)(void *arg), void *arg);
00094
00111 int jack_set_process_callback (jack_client_t *, JackProcessCallback process_callback, void *arg);
00112
00120 int jack_set_buffer_size_callback (jack_client_t *, JackBufferSizeCallback bufsize_callback, void *arg);
00121
00128 int jack_set_sample_rate_callback (jack_client_t *, JackSampleRateCallback srate_callback, void *arg);
00129
00136 int jack_set_port_registration_callback (jack_client_t *, JackPortRegistrationCallback registration_callback, void *arg);
00137
00144 int jack_set_graph_order_callback (jack_client_t *, JackGraphOrderCallback graph_callback, void *);
00145
00152 int jack_set_xrun_callback (jack_client_t *, JackXRunCallback xrun_callback, void *arg);
00153
00160 int jack_activate (jack_client_t *client);
00161
00170 int jack_deactivate (jack_client_t *client);
00171
00200 jack_port_t *jack_port_register (jack_client_t *,
00201 const char *port_name,
00202 const char *port_type,
00203 unsigned long flags,
00204 unsigned long buffer_size);
00205
00212 int jack_port_unregister (jack_client_t *, jack_port_t *);
00213
00230 void *jack_port_get_buffer (jack_port_t *, jack_nframes_t);
00231
00235 const char * jack_port_name (const jack_port_t *port);
00236
00240 const char * jack_port_short_name (const jack_port_t *port);
00241
00245 int jack_port_flags (const jack_port_t *port);
00246
00250 const char * jack_port_type (const jack_port_t *port);
00251
00255 int jack_port_is_mine (const jack_client_t *, const jack_port_t *port);
00256
00263 int jack_port_connected (const jack_port_t *port);
00264
00271 int jack_port_connected_to (const jack_port_t *port, const char *portname);
00272
00285 const char ** jack_port_get_connections (const jack_port_t *port);
00286
00305 const char ** jack_port_get_all_connections (const jack_client_t *client, const jack_port_t *port);
00306
00323 int jack_port_tie (jack_port_t *src, jack_port_t *dst);
00324
00332 int jack_port_untie (jack_port_t *port);
00333
00341 int jack_port_lock (jack_client_t *, jack_port_t *);
00342
00348 int jack_port_unlock (jack_client_t *, jack_port_t *);
00349
00361 jack_nframes_t jack_port_get_latency (jack_port_t *port);
00362
00368 jack_nframes_t jack_port_get_total_latency (jack_client_t *, jack_port_t *port);
00369
00380 void jack_port_set_latency (jack_port_t *, jack_nframes_t);
00381
00387 int jack_port_set_name (jack_port_t *port, const char *name);
00388
00392 double jack_port_get_peak (jack_port_t*, jack_nframes_t);
00393
00397 double jack_port_get_power (jack_port_t*, jack_nframes_t);
00398
00402 void jack_port_set_peak_function (jack_port_t *, double (*func)(jack_port_t*, jack_nframes_t));
00403
00407 void jack_port_set_power_function (jack_port_t *, double (*func)(jack_port_t*, jack_nframes_t));
00408
00414 int jack_port_request_monitor (jack_port_t *port, int onoff);
00415
00423 int jack_port_request_monitor_by_name (jack_client_t *client, const char *port_name, int onoff);
00424
00433 int jack_port_ensure_monitor (jack_port_t *port, int onoff);
00434
00439 int jack_port_monitoring_input (jack_port_t *port);
00440
00453 int jack_connect (jack_client_t *,
00454 const char *source_port,
00455 const char *destination_port);
00456
00466 int jack_disconnect (jack_client_t *,
00467 const char *source_port,
00468 const char *destination_port);
00469
00481 int jack_port_connect (jack_client_t *, jack_port_t *src, jack_port_t *dst);
00482
00492 int jack_port_disconnect (jack_client_t *, jack_port_t *);
00493
00498 unsigned long jack_get_sample_rate (jack_client_t *);
00499
00507 jack_nframes_t jack_get_buffer_size (jack_client_t *);
00508
00523 const char ** jack_get_ports (jack_client_t *,
00524 const char *port_name_pattern,
00525 const char *type_name_pattern,
00526 unsigned long flags);
00527
00532 jack_port_t *jack_port_by_name (jack_client_t *, const char *portname);
00533
00537 jack_port_t *jack_port_by_id (const jack_client_t *client, jack_port_id_t id);
00538
00548 int jack_engine_takeover_timebase (jack_client_t *);
00549
00553 void jack_update_time (jack_client_t *, jack_nframes_t);
00554
00560 jack_nframes_t jack_frames_since_cycle_start (const jack_client_t *);
00561
00568 jack_nframes_t jack_frame_time (const jack_client_t *);
00569
00577 float jack_cpu_load (jack_client_t *client);
00578
00587 void jack_set_server_dir (const char *path);
00588
00593 pthread_t jack_client_thread_id (jack_client_t *);
00594
00595 #ifdef __cplusplus
00596 }
00597 #endif
00598
00599 #endif
00600
00601