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.55 2004/01/09 18:43:47 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 
00046 jack_client_t *jack_client_new (const char *client_name);
00047 
00053 int jack_client_close (jack_client_t *client);
00054 
00062 int jack_internal_client_new (const char *client_name, const char *so_name, const char *so_data);
00063 
00069 void jack_internal_client_close (const char *client_name);
00070 
00078 int jack_is_realtime (jack_client_t *client);
00079 
00098 void jack_on_shutdown (jack_client_t *client, void (*function)(void *arg), void *arg);
00099 
00115 int jack_set_process_callback (jack_client_t *client,
00116                                JackProcessCallback process_callback,
00117                                void *arg);
00118 
00128 int jack_set_freewheel_callback (jack_client_t *client,
00129                                  JackFreewheelCallback freewheel_callback,
00130                                  void *arg);
00131 
00150 int jack_set_freewheel(jack_client_t* client, int onoff);
00151 
00167 int jack_set_buffer_size (jack_client_t *client, jack_nframes_t nframes);
00168 
00181 int jack_set_buffer_size_callback (jack_client_t *client,
00182                                    JackBufferSizeCallback bufsize_callback,
00183                                    void *arg);
00184 
00191 int jack_set_sample_rate_callback (jack_client_t *client,
00192                                    JackSampleRateCallback srate_callback,
00193                                    void *arg);
00194 
00201 int jack_set_port_registration_callback (jack_client_t *, JackPortRegistrationCallback registration_callback, void *arg);
00202 
00209 int jack_set_graph_order_callback (jack_client_t *, JackGraphOrderCallback graph_callback, void *);
00210 
00217 int jack_set_xrun_callback (jack_client_t *, JackXRunCallback xrun_callback, void *arg);
00218 
00225 int jack_activate (jack_client_t *client);
00226 
00235 int jack_deactivate (jack_client_t *client);
00236 
00263 jack_port_t *jack_port_register (jack_client_t *,
00264                                  const char *port_name,
00265                                  const char *port_type,
00266                                  unsigned long flags,
00267                                  unsigned long buffer_size);
00268 
00275 int jack_port_unregister (jack_client_t *, jack_port_t *);
00276 
00293 void *jack_port_get_buffer (jack_port_t *, jack_nframes_t);
00294 
00298 const char * jack_port_name (const jack_port_t *port);
00299 
00303 const char * jack_port_short_name (const jack_port_t *port);
00304 
00308 int jack_port_flags (const jack_port_t *port);
00309 
00313 const char * jack_port_type (const jack_port_t *port);
00314 
00318 int jack_port_is_mine (const jack_client_t *, const jack_port_t *port);
00319 
00326 int jack_port_connected (const jack_port_t *port);
00327 
00334 int jack_port_connected_to (const jack_port_t *port, const char *portname);
00335 
00348 const char ** jack_port_get_connections (const jack_port_t *port);
00349 
00368 const char ** jack_port_get_all_connections (const jack_client_t *client, const jack_port_t *port);
00369 
00386 int  jack_port_tie (jack_port_t *src, jack_port_t *dst);
00387 
00395 int  jack_port_untie (jack_port_t *port);
00396 
00404 int jack_port_lock (jack_client_t *, jack_port_t *);
00405 
00411 int jack_port_unlock (jack_client_t *, jack_port_t *);
00412 
00424 jack_nframes_t jack_port_get_latency (jack_port_t *port);
00425 
00431 jack_nframes_t jack_port_get_total_latency (jack_client_t *, jack_port_t *port);
00432 
00443 void jack_port_set_latency (jack_port_t *, jack_nframes_t);
00444 
00450 int jack_port_set_name (jack_port_t *port, const char *name);
00451 
00457 int jack_port_request_monitor (jack_port_t *port, int onoff);
00458 
00466 int jack_port_request_monitor_by_name (jack_client_t *client, const char *port_name, int onoff);
00467 
00476 int jack_port_ensure_monitor (jack_port_t *port, int onoff);
00477 
00482 int jack_port_monitoring_input (jack_port_t *port);
00483 
00497 int jack_connect (jack_client_t *,
00498                   const char *source_port,
00499                   const char *destination_port);
00500 
00510 int jack_disconnect (jack_client_t *,
00511                      const char *source_port,
00512                      const char *destination_port);
00513 
00525 int jack_port_connect (jack_client_t *, jack_port_t *src, jack_port_t *dst);
00526 
00536 int jack_port_disconnect (jack_client_t *, jack_port_t *);
00537 
00542 jack_nframes_t jack_get_sample_rate (jack_client_t *);
00543 
00553 jack_nframes_t jack_get_buffer_size (jack_client_t *);
00554 
00569 const char ** jack_get_ports (jack_client_t *, 
00570                               const char *port_name_pattern, 
00571                               const char *type_name_pattern, 
00572                               unsigned long flags);
00573 
00578 jack_port_t *jack_port_by_name (jack_client_t *, const char *portname);
00579 
00583 jack_port_t *jack_port_by_id (const jack_client_t *client, jack_port_id_t id);
00584 
00595 int  jack_engine_takeover_timebase (jack_client_t *);
00596 
00601 jack_nframes_t jack_frames_since_cycle_start (const jack_client_t *);
00602 
00609 jack_nframes_t jack_frame_time (const jack_client_t *);
00610 
00618 float jack_cpu_load (jack_client_t *client);
00619 
00631 void jack_set_server_dir (const char *path);
00632 
00637 pthread_t jack_client_thread_id (jack_client_t *);
00638 
00647 extern void (*jack_error_callback)(const char *msg);
00648 
00655 void jack_set_error_function (void (*func)(const char *));
00656 
00657 #ifdef __cplusplus
00658 }
00659 #endif
00660 
00661 #endif /* __jack_h__ */
00662 
00663 

Generated on Sun Feb 29 14:33:03 2004 for JACK-AUDIO-CONNECTION-KIT by doxygen 1.3.6-20040222