types.h

Go to the documentation of this file.
00001 /*
00002     Copyright (C) 2001 Paul Davis
00003     Copyright (C) 2004 Jack O'Quin
00004     
00005     This program is free software; you can redistribute it and/or modify
00006     it under the terms of the GNU Lesser General Public License as published by
00007     the Free Software Foundation; either version 2.1 of the License, or
00008     (at your option) any later version.
00009     
00010     This program is distributed in the hope that it will be useful,
00011     but WITHOUT ANY WARRANTY; without even the implied warranty of
00012     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013     GNU Lesser General Public License for more details.
00014     
00015     You should have received a copy of the GNU Lesser General Public License
00016     along with this program; if not, write to the Free Software 
00017     Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
00018 
00019 */
00020 
00021 #ifndef __jack_types_h__
00022 #define __jack_types_h__
00023 
00024 #include <inttypes.h>
00025 
00026 typedef int32_t jack_shmsize_t;
00027 
00031 typedef uint32_t             jack_nframes_t;
00032 
00036 #define JACK_MAX_FRAMES (4294967295U)   /* This should be UINT32_MAX, but
00037                                            C++ has a problem with that. */
00038 
00043 typedef uint64_t jack_time_t;
00044 
00049 #define JACK_LOAD_INIT_LIMIT 1024
00050 
00056 typedef uint64_t jack_intclient_t;
00057 
00062 typedef struct _jack_port    jack_port_t;
00063 
00068 typedef struct _jack_client  jack_client_t;
00069 
00074 typedef uint32_t             jack_port_id_t;
00075 
00076 
00080 enum JackOptions {
00081 
00085      JackNullOption = 0x00,
00086 
00093      JackNoStartServer = 0x01,
00094 
00099      JackUseExactName = 0x02,
00100 
00104      JackServerName = 0x04,
00105 
00110      JackLoadName = 0x08,
00111 
00116      JackLoadInit = 0x10
00117 };
00118 
00120 #define JackOpenOptions (JackServerName|JackNoStartServer|JackUseExactName)
00121 
00123 #define JackLoadOptions (JackLoadInit|JackLoadName|JackUseExactName)
00124 
00129 typedef enum JackOptions jack_options_t;
00130 
00134 enum JackStatus {
00135 
00139      JackFailure = 0x01,
00140 
00144      JackInvalidOption = 0x02,
00145 
00155      JackNameNotUnique = 0x04,
00156 
00163      JackServerStarted = 0x08,
00164 
00168      JackServerFailed = 0x10,
00169 
00173      JackServerError = 0x20,
00174 
00178      JackNoSuchClient = 0x40,
00179 
00183      JackLoadFailure = 0x80,
00184 
00188      JackInitFailure = 0x100,
00189 
00193      JackShmFailure = 0x200,
00194 
00198      JackVersionError = 0x400,
00199 
00200      /*
00201       * BackendError
00202       */
00203      JackBackendError = 0x800,
00204 
00205      /*
00206       * Client is being shutdown against its will
00207       */
00208      JackClientZombie = 0x1000
00209 };
00210 
00215 typedef enum JackStatus jack_status_t;
00216 
00229 typedef int  (*JackProcessCallback)(jack_nframes_t nframes, void *arg);
00230 
00243 typedef void  (*JackThreadInitCallback)(void *arg);
00244 
00253 typedef int  (*JackGraphOrderCallback)(void *arg);
00254 
00265 typedef int  (*JackXRunCallback)(void *arg);
00266 
00281 typedef int  (*JackBufferSizeCallback)(jack_nframes_t nframes, void *arg);
00282 
00292 typedef int  (*JackSampleRateCallback)(jack_nframes_t nframes, void *arg);
00293 
00303 typedef void (*JackPortRegistrationCallback)(jack_port_id_t port, int register, void *arg);
00304 
00314 typedef void (*JackClientRegistrationCallback)(const char* name, int register, void *arg);
00315 
00326 typedef void (*JackPortConnectCallback)(jack_port_id_t a, jack_port_id_t b, int connect, void* arg);
00327 
00335 typedef void (*JackFreewheelCallback)(int starting, void *arg);
00336 
00337 typedef void *(*JackThreadCallback)(void* arg);
00338 
00350 typedef void (*JackShutdownCallback)(void *arg);
00351 
00365 typedef void (*JackInfoShutdownCallback)(jack_status_t code, const char* reason, void *arg);
00366 
00371 #define JACK_DEFAULT_AUDIO_TYPE "32 bit float mono audio"
00372 #define JACK_DEFAULT_MIDI_TYPE "8 bit raw midi"
00373 
00379 typedef float jack_default_audio_sample_t;
00380 
00387 enum JackPortFlags {
00388 
00393      JackPortIsInput = 0x1,
00394 
00399      JackPortIsOutput = 0x2,
00400 
00405      JackPortIsPhysical = 0x4, 
00406 
00420      JackPortCanMonitor = 0x8,
00421 
00436      JackPortIsTerminal = 0x10
00437 };          
00438 
00439 
00440 #if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3 )                   
00441 # define JACK_DEPRECATED __attribute__((__deprecated__))                      
00442 #else                                                                         
00443 # define JACK_DEPRECATED                                                      
00444 #endif
00445 
00446 #endif /* __jack_types_h__ */
00447 
Generated on Tue Jul 6 08:43:02 2010 for JACK-AUDIO-CONNECTION-KIT by  doxygen 1.6.3