jack.h

Go to the documentation of this file.
00001 /* 00002 Copyright (C) 2001 Paul Davis 00003 00004 This program is free software; you can redistribute it and/or modify 00005 it under the terms of the GNU Lesser General Public License as published by 00006 the Free Software Foundation; either version 2.1 of the License, or 00007 (at your option) any later version. 00008 00009 This program is distributed in the hope that it will be useful, 00010 but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 GNU Lesser General Public License for more details. 00013 00014 You should have received a copy of the GNU Lesser General Public License 00015 along with this program; if not, write to the Free Software 00016 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00017 00018 $Id: jack.h,v 1.69 2004/11/28 00:29:45 joq Exp $ 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 00070 jack_client_t *jack_client_open (const char *client_name, 00071 jack_options_t options, 00072 jack_status_t *status, ...); 00073 00095 jack_client_t *jack_client_new (const char *client_name); 00096 00102 int jack_client_close (jack_client_t *client); 00103 00108 int jack_client_name_size (void); 00109 00116 char *jack_get_client_name (jack_client_t *client); 00117 00139 int jack_internal_client_new (const char *client_name, 00140 const char *load_name, 00141 const char *load_init); 00142 00148 void jack_internal_client_close (const char *client_name); 00149 00157 int jack_is_realtime (jack_client_t *client); 00158 00177 void jack_on_shutdown (jack_client_t *client, 00178 void (*function)(void *arg), void *arg); 00179 00195 int jack_set_process_callback (jack_client_t *client, 00196 JackProcessCallback process_callback, 00197 void *arg); 00198 00210 int jack_set_thread_init_callback (jack_client_t *client, 00211 JackThreadInitCallback thread_init_callback, 00212 void *arg); 00213 00223 int jack_set_freewheel_callback (jack_client_t *client, 00224 JackFreewheelCallback freewheel_callback, 00225 void *arg); 00226 00245 int jack_set_freewheel(jack_client_t* client, int onoff); 00246 00262 int jack_set_buffer_size (jack_client_t *client, jack_nframes_t nframes); 00263 00276 int jack_set_buffer_size_callback (jack_client_t *client, 00277 JackBufferSizeCallback bufsize_callback, 00278 void *arg); 00279 00286 int jack_set_sample_rate_callback (jack_client_t *client, 00287 JackSampleRateCallback srate_callback, 00288 void *arg); 00289 00296 int jack_set_port_registration_callback (jack_client_t *, 00297 JackPortRegistrationCallback 00298 registration_callback, void *arg); 00299 00306 int jack_set_graph_order_callback (jack_client_t *, 00307 JackGraphOrderCallback graph_callback, 00308 void *); 00309 00316 int jack_set_xrun_callback (jack_client_t *, 00317 JackXRunCallback xrun_callback, void *arg); 00318 00324 float jack_get_xrun_delayed_usecs (jack_client_t *client); 00325 00332 int jack_activate (jack_client_t *client); 00333 00341 int jack_deactivate (jack_client_t *client); 00342 00369 jack_port_t *jack_port_register (jack_client_t *client, 00370 const char *port_name, 00371 const char *port_type, 00372 unsigned long flags, 00373 unsigned long buffer_size); 00374 00381 int jack_port_unregister (jack_client_t *, jack_port_t *); 00382 00399 void *jack_port_get_buffer (jack_port_t *, jack_nframes_t); 00400 00407 const char *jack_port_name (const jack_port_t *port); 00408 00415 const char *jack_port_short_name (const jack_port_t *port); 00416 00420 int jack_port_flags (const jack_port_t *port); 00421 00426 const char *jack_port_type (const jack_port_t *port); 00427 00431 int jack_port_is_mine (const jack_client_t *, const jack_port_t *port); 00432 00438 int jack_port_connected (const jack_port_t *port); 00439 00446 int jack_port_connected_to (const jack_port_t *port, 00447 const char *port_name); 00448 00460 const char **jack_port_get_connections (const jack_port_t *port); 00461 00481 const char **jack_port_get_all_connections (const jack_client_t *client, 00482 const jack_port_t *port); 00483 00500 int jack_port_tie (jack_port_t *src, jack_port_t *dst); 00501 00509 int jack_port_untie (jack_port_t *port); 00510 00518 int jack_port_lock (jack_client_t *, jack_port_t *); 00519 00525 int jack_port_unlock (jack_client_t *, jack_port_t *); 00526 00537 jack_nframes_t jack_port_get_latency (jack_port_t *port); 00538 00544 jack_nframes_t jack_port_get_total_latency (jack_client_t *, 00545 jack_port_t *port); 00546 00557 void jack_port_set_latency (jack_port_t *, jack_nframes_t); 00558 00566 int jack_port_set_name (jack_port_t *port, const char *port_name); 00567 00572 int jack_port_request_monitor (jack_port_t *port, int onoff); 00573 00582 int jack_port_request_monitor_by_name (jack_client_t *client, 00583 const char *port_name, int onoff); 00584 00592 int jack_port_ensure_monitor (jack_port_t *port, int onoff); 00593 00597 int jack_port_monitoring_input (jack_port_t *port); 00598 00616 int jack_connect (jack_client_t *, 00617 const char *source_port, 00618 const char *destination_port); 00619 00633 int jack_disconnect (jack_client_t *, 00634 const char *source_port, 00635 const char *destination_port); 00636 00646 int jack_port_disconnect (jack_client_t *, jack_port_t *); 00647 00656 int jack_port_name_size(void); 00657 00662 int jack_port_type_size(void); 00663 00668 jack_nframes_t jack_get_sample_rate (jack_client_t *); 00669 00679 jack_nframes_t jack_get_buffer_size (jack_client_t *); 00680 00697 const char **jack_get_ports (jack_client_t *, 00698 const char *port_name_pattern, 00699 const char *type_name_pattern, 00700 unsigned long flags); 00701 00707 jack_port_t *jack_port_by_name (jack_client_t *, const char *port_name); 00708 00712 jack_port_t *jack_port_by_id (const jack_client_t *client, 00713 jack_port_id_t port_id); 00714 00725 int jack_engine_takeover_timebase (jack_client_t *); 00726 00731 jack_nframes_t jack_frames_since_cycle_start (const jack_client_t *); 00732 00738 jack_nframes_t jack_frame_time (const jack_client_t *); 00739 00747 jack_nframes_t jack_last_frame_time (const jack_client_t *client); 00748 00749 00756 float jack_cpu_load (jack_client_t *client); 00757 00769 void jack_set_server_dir (const char *path); 00770 00775 pthread_t jack_client_thread_id (jack_client_t *); 00776 00785 extern void (*jack_error_callback)(const char *msg); 00786 00793 void jack_set_error_function (void (*func)(const char *)); 00794 00795 #ifdef __cplusplus 00796 } 00797 #endif 00798 00799 #endif /* __jack_h__ */

Generated on Sat Jan 15 22:24:32 2005 for JACK-AUDIO-CONNECTION-KIT by doxygen 1.3.7