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.24 2002/05/20 17:43:25 wingo Exp $
00019 */
00020 
00021 #ifndef __jack_h__
00022 #define __jack_h__
00023 
00024 #ifdef __cplusplus
00025 extern "C" {
00026 #endif
00027 
00028 #include <jack/types.h>
00029 #include <jack/error.h>
00030 #include <jack/transport.h>
00031 
00039 jack_client_t *jack_client_new (const char *client_name);
00040 
00044 int            jack_client_close (jack_client_t *client);
00045 
00064 void jack_on_shutdown (jack_client_t *client, void (*function)(void *arg), void *arg);
00065 
00070 int jack_set_process_callback (jack_client_t *, JackProcessCallback process_callback, void *arg);
00071 
00077 int jack_set_buffer_size_callback (jack_client_t *, JackBufferSizeCallback bufsize_callback, void *arg);
00078 
00083 int jack_set_sample_rate_callback (jack_client_t *, JackSampleRateCallback srate_callback, void *arg);
00084 
00089 int jack_set_port_registration_callback (jack_client_t *, JackPortRegistrationCallback registration_callback, void *arg);
00090 
00095 int jack_set_graph_order_callback (jack_client_t *, JackGraphOrderCallback graph_callback, void *);
00096 
00101 int jack_set_xrun_callback (jack_client_t *, JackXRunCallback xrun_callback, void *arg);
00102 
00107 int jack_activate (jack_client_t *client);
00108 
00115 int jack_deactivate (jack_client_t *client);
00116 
00138 jack_port_t *jack_port_register (jack_client_t *,
00139                                  const char *port_name,
00140                                  const char *port_type,
00141                                  unsigned long flags,
00142                                  unsigned long buffer_size);
00143 
00148 int jack_port_unregister (jack_client_t *, jack_port_t *);
00149 
00153 const char * jack_port_name (const jack_port_t *port);
00154 
00158 const char * jack_port_short_name (const jack_port_t *port);
00159 
00163 int          jack_port_flags (const jack_port_t *port);
00164 
00168 const char * jack_port_type (const jack_port_t *port);
00169 
00173 int          jack_port_is_mine (const jack_client_t *, const jack_port_t *port);
00174 
00179 int jack_port_connected (const jack_port_t *port);
00180 
00185 int jack_port_connected_to (const jack_port_t *port, const char *portname);
00186 
00191 int jack_port_connected_to_port (const jack_port_t *port, const jack_port_t *other_port);
00192 
00201 const char ** jack_port_get_connections (const jack_port_t *port);
00202 
00206 int jack_port_set_name (jack_port_t *port, const char *name);
00207 
00222 void *jack_port_get_buffer (jack_port_t *, jack_nframes_t);
00223 
00234 int jack_connect (jack_client_t *,
00235                   const char *source_port,
00236                   const char *destination_port);
00237 
00245 int jack_disconnect (jack_client_t *,
00246                      const char *source_port,
00247                      const char *destination_port);
00248 
00258 int jack_port_connect (jack_client_t *, jack_port_t *src, jack_port_t *dst);
00259 
00269 int jack_port_disconnect (jack_client_t *, jack_port_t *);
00270 
00285 int  jack_port_tie (jack_port_t *src, jack_port_t *dst);
00286 
00292 int  jack_port_untie (jack_port_t *port);
00293 
00299 int jack_port_lock (jack_client_t *, jack_port_t *);
00300 
00304 int jack_port_unlock (jack_client_t *, jack_port_t *);
00305 
00316 jack_nframes_t jack_port_get_latency (jack_port_t *port);
00317 
00323 jack_nframes_t jack_port_get_total_latency (jack_client_t *, jack_port_t *port);
00324 
00336 void jack_port_set_latency (jack_port_t *, jack_nframes_t);
00337 
00343 int jack_port_request_monitor (jack_port_t *port, int onoff);
00344 
00350 int jack_port_request_monitor_by_name (jack_client_t *client, const char *port_name, int onoff);
00351 
00358 int jack_port_ensure_monitor (jack_port_t *port, int onoff);
00359 
00364 int jack_port_monitoring_input (jack_port_t *port);
00365 
00370 unsigned long jack_get_sample_rate (jack_client_t *);
00371 
00379 jack_nframes_t jack_get_buffer_size (jack_client_t *);
00380 
00396 const char ** jack_get_ports (jack_client_t *, 
00397                               const char *port_name_pattern, 
00398                               const char *type_name_pattern, 
00399                               unsigned long flags);
00400 
00405 jack_port_t *jack_port_by_name (jack_client_t *, const char *portname);
00406 
00410 jack_port_t *jack_port_by_id (jack_client_t *client, jack_port_id_t id);
00411 
00419 int  jack_engine_takeover_timebase (jack_client_t *);
00420 
00424 void jack_update_time (jack_client_t *, jack_nframes_t);
00425 
00431 jack_nframes_t jack_frames_since_cycle_start (const jack_client_t *);
00432 
00439 jack_nframes_t jack_frame_time (const jack_client_t *);
00440 
00448 float jack_cpu_load (jack_client_t *client);
00449 
00450 #ifdef __cplusplus
00451 }
00452 #endif
00453 
00454 #endif /* __jack_h__ */
00455 

Generated on Sun Nov 10 13:31:47 2002 for Jack by doxygen1.2.18