Main Page | Data Structures | File List | Data Fields | Globals

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.43 2003/07/20 01:38:31 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 
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 
00110 int jack_set_process_callback (jack_client_t *, JackProcessCallback process_callback, void *arg);
00111 
00119 int jack_set_buffer_size_callback (jack_client_t *, JackBufferSizeCallback bufsize_callback, void *arg);
00120 
00127 int jack_set_sample_rate_callback (jack_client_t *, JackSampleRateCallback srate_callback, void *arg);
00128 
00135 int jack_set_port_registration_callback (jack_client_t *, JackPortRegistrationCallback registration_callback, void *arg);
00136 
00143 int jack_set_graph_order_callback (jack_client_t *, JackGraphOrderCallback graph_callback, void *);
00144 
00151 int jack_set_xrun_callback (jack_client_t *, JackXRunCallback xrun_callback, void *arg);
00152 
00159 int jack_activate (jack_client_t *client);
00160 
00169 int jack_deactivate (jack_client_t *client);
00170 
00199 jack_port_t *jack_port_register (jack_client_t *,
00200                                  const char *port_name,
00201                                  const char *port_type,
00202                                  unsigned long flags,
00203                                  unsigned long buffer_size);
00204 
00211 int jack_port_unregister (jack_client_t *, jack_port_t *);
00212 
00229 void *jack_port_get_buffer (jack_port_t *, jack_nframes_t);
00230 
00234 const char * jack_port_name (const jack_port_t *port);
00235 
00239 const char * jack_port_short_name (const jack_port_t *port);
00240 
00244 int jack_port_flags (const jack_port_t *port);
00245 
00249 const char * jack_port_type (const jack_port_t *port);
00250 
00254 int jack_port_is_mine (const jack_client_t *, const jack_port_t *port);
00255 
00262 int jack_port_connected (const jack_port_t *port);
00263 
00270 int jack_port_connected_to (const jack_port_t *port, const char *portname);
00271 
00284 const char ** jack_port_get_connections (const jack_port_t *port);
00285 
00304 const char ** jack_port_get_all_connections (const jack_client_t *client, const jack_port_t *port);
00305 
00322 int  jack_port_tie (jack_port_t *src, jack_port_t *dst);
00323 
00331 int  jack_port_untie (jack_port_t *port);
00332 
00340 int jack_port_lock (jack_client_t *, jack_port_t *);
00341 
00347 int jack_port_unlock (jack_client_t *, jack_port_t *);
00348 
00360 jack_nframes_t jack_port_get_latency (jack_port_t *port);
00361 
00367 jack_nframes_t jack_port_get_total_latency (jack_client_t *, jack_port_t *port);
00368 
00379 void jack_port_set_latency (jack_port_t *, jack_nframes_t);
00380 
00386 int jack_port_set_name (jack_port_t *port, const char *name);
00387 
00391 double jack_port_get_peak (jack_port_t*, jack_nframes_t);
00392 
00396 double jack_port_get_power (jack_port_t*, jack_nframes_t);
00397 
00401 void jack_port_set_peak_function (jack_port_t *, double (*func)(jack_port_t*, jack_nframes_t));
00402 
00406 void jack_port_set_power_function (jack_port_t *, double (*func)(jack_port_t*, jack_nframes_t));
00407 
00413 int jack_port_request_monitor (jack_port_t *port, int onoff);
00414 
00422 int jack_port_request_monitor_by_name (jack_client_t *client, const char *port_name, int onoff);
00423 
00432 int jack_port_ensure_monitor (jack_port_t *port, int onoff);
00433 
00438 int jack_port_monitoring_input (jack_port_t *port);
00439 
00452 int jack_connect (jack_client_t *,
00453                   const char *source_port,
00454                   const char *destination_port);
00455 
00465 int jack_disconnect (jack_client_t *,
00466                      const char *source_port,
00467                      const char *destination_port);
00468 
00480 int jack_port_connect (jack_client_t *, jack_port_t *src, jack_port_t *dst);
00481 
00491 int jack_port_disconnect (jack_client_t *, jack_port_t *);
00492 
00497 unsigned long jack_get_sample_rate (jack_client_t *);
00498 
00506 jack_nframes_t jack_get_buffer_size (jack_client_t *);
00507 
00522 const char ** jack_get_ports (jack_client_t *, 
00523                               const char *port_name_pattern, 
00524                               const char *type_name_pattern, 
00525                               unsigned long flags);
00526 
00531 jack_port_t *jack_port_by_name (jack_client_t *, const char *portname);
00532 
00536 jack_port_t *jack_port_by_id (const jack_client_t *client, jack_port_id_t id);
00537 
00547 int  jack_engine_takeover_timebase (jack_client_t *);
00548 
00552 void jack_update_time (jack_client_t *, jack_nframes_t);
00553 
00559 jack_nframes_t jack_frames_since_cycle_start (const jack_client_t *);
00560 
00567 jack_nframes_t jack_frame_time (const jack_client_t *);
00568 
00576 float jack_cpu_load (jack_client_t *client);
00577 
00586 void jack_set_server_dir (const char *path);
00587 
00592 pthread_t jack_client_thread_id (jack_client_t *);
00593 
00594 extern void (*jack_error_callback)(const char *desc);
00595 
00599 void jack_set_error_function (void (*func)(const char *));
00600 
00601 #ifdef __cplusplus
00602 }
00603 #endif
00604 
00605 #endif /* __jack_h__ */
00606 
00607 

Generated on Wed Aug 6 04:09:57 2003 for Jack by doxygen 1.3.2