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 
00121      JackSessionID = 0x20
00122 };
00123 
00125 #define JackOpenOptions (JackSessionID|JackServerName|JackNoStartServer|JackUseExactName)
00126 
00128 #define JackLoadOptions (JackLoadInit|JackLoadName|JackUseExactName)
00129 
00134 typedef enum JackOptions jack_options_t;
00135 
00139 enum JackStatus {
00140 
00144      JackFailure = 0x01,
00145 
00149      JackInvalidOption = 0x02,
00150 
00160      JackNameNotUnique = 0x04,
00161 
00168      JackServerStarted = 0x08,
00169 
00173      JackServerFailed = 0x10,
00174 
00178      JackServerError = 0x20,
00179 
00183      JackNoSuchClient = 0x40,
00184 
00188      JackLoadFailure = 0x80,
00189 
00193      JackInitFailure = 0x100,
00194 
00198      JackShmFailure = 0x200,
00199 
00203      JackVersionError = 0x400,
00204 
00205      /*
00206       * BackendError
00207       */
00208      JackBackendError = 0x800,
00209 
00210      /*
00211       * Client is being shutdown against its will
00212       */
00213      JackClientZombie = 0x1000
00214 };
00215 
00220 typedef enum JackStatus jack_status_t;
00221 
00234 typedef int  (*JackProcessCallback)(jack_nframes_t nframes, void *arg);
00235 
00248 typedef void  (*JackThreadInitCallback)(void *arg);
00249 
00258 typedef int  (*JackGraphOrderCallback)(void *arg);
00259 
00270 typedef int  (*JackXRunCallback)(void *arg);
00271 
00286 typedef int  (*JackBufferSizeCallback)(jack_nframes_t nframes, void *arg);
00287 
00297 typedef int  (*JackSampleRateCallback)(jack_nframes_t nframes, void *arg);
00298 
00308 typedef void (*JackPortRegistrationCallback)(jack_port_id_t port, int register, void *arg);
00309 
00319 typedef void (*JackClientRegistrationCallback)(const char* name, int register, void *arg);
00320 
00331 typedef void (*JackPortConnectCallback)(jack_port_id_t a, jack_port_id_t b, int connect, void* arg);
00332 
00340 typedef void (*JackFreewheelCallback)(int starting, void *arg);
00341 
00342 typedef void *(*JackThreadCallback)(void* arg);
00343 
00355 typedef void (*JackShutdownCallback)(void *arg);
00356 
00370 typedef void (*JackInfoShutdownCallback)(jack_status_t code, const char* reason, void *arg);
00371 
00376 #define JACK_DEFAULT_AUDIO_TYPE "32 bit float mono audio"
00377 #define JACK_DEFAULT_MIDI_TYPE "8 bit raw midi"
00378 
00384 typedef float jack_default_audio_sample_t;
00385 
00392 enum JackPortFlags {
00393 
00398      JackPortIsInput = 0x1,
00399 
00404      JackPortIsOutput = 0x2,
00405 
00410      JackPortIsPhysical = 0x4, 
00411 
00425      JackPortCanMonitor = 0x8,
00426 
00441      JackPortIsTerminal = 0x10
00442 };          
00443 
00444 
00445 #endif /* __jack_types_h__ */
00446 

Generated for JACK-AUDIO-CONNECTION-KIT by  doxygen1.6.1