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.54 2003/12/01 19:45:14 pbd 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 
00109 int jack_set_process_callback (jack_client_t *client,
00110                                JackProcessCallback process_callback,
00111                                void *arg);
00112 
00122 int jack_set_freewheel_callback (jack_client_t *client,
00123                                  JackFreewheelCallback freewheel_callback,
00124                                  void *arg);
00125 
00144 int jack_set_freewheel(jack_client_t* client, int onoff);
00145 
00161 int jack_set_buffer_size (jack_client_t *client, jack_nframes_t nframes);
00162 
00175 int jack_set_buffer_size_callback (jack_client_t *client,
00176                                    JackBufferSizeCallback bufsize_callback,
00177                                    void *arg);
00178 
00185 int jack_set_sample_rate_callback (jack_client_t *client,
00186                                    JackSampleRateCallback srate_callback,
00187                                    void *arg);
00188 
00195 int jack_set_port_registration_callback (jack_client_t *, JackPortRegistrationCallback registration_callback, void *arg);
00196 
00203 int jack_set_graph_order_callback (jack_client_t *, JackGraphOrderCallback graph_callback, void *);
00204 
00211 int jack_set_xrun_callback (jack_client_t *, JackXRunCallback xrun_callback, void *arg);
00212 
00219 int jack_activate (jack_client_t *client);
00220 
00229 int jack_deactivate (jack_client_t *client);
00230 
00257 jack_port_t *jack_port_register (jack_client_t *,
00258                                  const char *port_name,
00259                                  const char *port_type,
00260                                  unsigned long flags,
00261                                  unsigned long buffer_size);
00262 
00269 int jack_port_unregister (jack_client_t *, jack_port_t *);
00270 
00287 void *jack_port_get_buffer (jack_port_t *, jack_nframes_t);
00288 
00292 const char * jack_port_name (const jack_port_t *port);
00293 
00297 const char * jack_port_short_name (const jack_port_t *port);
00298 
00302 int jack_port_flags (const jack_port_t *port);
00303 
00307 const char * jack_port_type (const jack_port_t *port);
00308 
00312 int jack_port_is_mine (const jack_client_t *, const jack_port_t *port);
00313 
00320 int jack_port_connected (const jack_port_t *port);
00321 
00328 int jack_port_connected_to (const jack_port_t *port, const char *portname);
00329 
00342 const char ** jack_port_get_connections (const jack_port_t *port);
00343 
00362 const char ** jack_port_get_all_connections (const jack_client_t *client, const jack_port_t *port);
00363 
00380 int  jack_port_tie (jack_port_t *src, jack_port_t *dst);
00381 
00389 int  jack_port_untie (jack_port_t *port);
00390 
00398 int jack_port_lock (jack_client_t *, jack_port_t *);
00399 
00405 int jack_port_unlock (jack_client_t *, jack_port_t *);
00406 
00418 jack_nframes_t jack_port_get_latency (jack_port_t *port);
00419 
00425 jack_nframes_t jack_port_get_total_latency (jack_client_t *, jack_port_t *port);
00426 
00437 void jack_port_set_latency (jack_port_t *, jack_nframes_t);
00438 
00444 int jack_port_set_name (jack_port_t *port, const char *name);
00445 
00451 int jack_port_request_monitor (jack_port_t *port, int onoff);
00452 
00460 int jack_port_request_monitor_by_name (jack_client_t *client, const char *port_name, int onoff);
00461 
00470 int jack_port_ensure_monitor (jack_port_t *port, int onoff);
00471 
00476 int jack_port_monitoring_input (jack_port_t *port);
00477 
00491 int jack_connect (jack_client_t *,
00492                   const char *source_port,
00493                   const char *destination_port);
00494 
00504 int jack_disconnect (jack_client_t *,
00505                      const char *source_port,
00506                      const char *destination_port);
00507 
00519 int jack_port_connect (jack_client_t *, jack_port_t *src, jack_port_t *dst);
00520 
00530 int jack_port_disconnect (jack_client_t *, jack_port_t *);
00531 
00536 jack_nframes_t jack_get_sample_rate (jack_client_t *);
00537 
00547 jack_nframes_t jack_get_buffer_size (jack_client_t *);
00548 
00563 const char ** jack_get_ports (jack_client_t *, 
00564                               const char *port_name_pattern, 
00565                               const char *type_name_pattern, 
00566                               unsigned long flags);
00567 
00572 jack_port_t *jack_port_by_name (jack_client_t *, const char *portname);
00573 
00577 jack_port_t *jack_port_by_id (const jack_client_t *client, jack_port_id_t id);
00578 
00589 int  jack_engine_takeover_timebase (jack_client_t *);
00590 
00595 jack_nframes_t jack_frames_since_cycle_start (const jack_client_t *);
00596 
00603 jack_nframes_t jack_frame_time (const jack_client_t *);
00604 
00612 float jack_cpu_load (jack_client_t *client);
00613 
00625 void jack_set_server_dir (const char *path);
00626 
00631 pthread_t jack_client_thread_id (jack_client_t *);
00632 
00633 extern void (*jack_error_callback)(const char *desc);
00634 
00638 void jack_set_error_function (void (*func)(const char *));
00639 
00640 #ifdef __cplusplus
00641 }
00642 #endif
00643 
00644 #endif /* __jack_h__ */
00645 
00646 

Generated on Tue Dec 16 20:13:12 2003 for JACK-AUDIO-CONNECTION-KIT by doxygen 1.3.4