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 #ifndef PRIu32
00026 #define        PRIi32          "i"     /* int32_t */
00027 #define        PRIu32          "u"     /* uint32_t */
00028 #define        PRIu64          "llu"    /* uint64_t */
00029 #define        SCNu64          "llu"    /* uint64_t */
00030 #define        PRId32          "d"     /* int32_t */
00031 #define        PRIx64          "llx"    /* uint64_t */
00032 #endif
00033 
00034 typedef int32_t jack_shmsize_t;
00035 
00039 typedef uint32_t             jack_nframes_t;
00040 
00044 #define JACK_MAX_FRAMES (4294967295U)   /* This should be UINT32_MAX, but
00045                                            C++ has a problem with that. */
00046 
00051 typedef uint64_t jack_time_t;
00052 
00057 #define JACK_LOAD_INIT_LIMIT 1024
00058 
00064 typedef uint64_t jack_intclient_t;
00065 
00070 typedef struct _jack_port    jack_port_t;
00071 
00076 typedef struct _jack_client  jack_client_t;
00077 
00082 typedef uint32_t             jack_port_id_t;
00083 
00096 typedef int  (*JackProcessCallback)(jack_nframes_t nframes, void *arg);
00097 
00110 typedef void  (*JackThreadInitCallback)(void *arg);
00111 
00120 typedef int  (*JackGraphOrderCallback)(void *arg);
00121 
00132 typedef int  (*JackXRunCallback)(void *arg);
00133 
00148 typedef int  (*JackBufferSizeCallback)(jack_nframes_t nframes, void *arg);
00149 
00159 typedef int  (*JackSampleRateCallback)(jack_nframes_t nframes, void *arg);
00160 
00170 typedef void (*JackPortRegistrationCallback)(jack_port_id_t port, int register, void *arg);
00171 
00181 typedef void (*JackClientRegistrationCallback)(const char* name, int register, void *arg);
00182 
00193 typedef void (*JackPortConnectCallback)(jack_port_id_t a, jack_port_id_t b, int connect, void* arg);
00194 
00202 typedef void (*JackFreewheelCallback)(int starting, void *arg);
00203 
00204 typedef void *(*JackThreadCallback)(void* arg);
00205 
00210 #define JACK_DEFAULT_AUDIO_TYPE "32 bit float mono audio"
00211 #define JACK_DEFAULT_MIDI_TYPE "8 bit raw midi"
00212 
00218 typedef float jack_default_audio_sample_t;
00219 
00226 enum JackPortFlags {
00227 
00232      JackPortIsInput = 0x1,
00233 
00238      JackPortIsOutput = 0x2,
00239 
00244      JackPortIsPhysical = 0x4, 
00245 
00259      JackPortCanMonitor = 0x8,
00260 
00275      JackPortIsTerminal = 0x10
00276 };          
00277 
00281 enum JackOptions {
00282 
00286      JackNullOption = 0x00,
00287 
00294      JackNoStartServer = 0x01,
00295 
00300      JackUseExactName = 0x02,
00301 
00305      JackServerName = 0x04,
00306 
00311      JackLoadName = 0x08,
00312 
00317      JackLoadInit = 0x10
00318 };
00319 
00321 #define JackOpenOptions (JackServerName|JackNoStartServer|JackUseExactName)
00322 
00324 #define JackLoadOptions (JackLoadInit|JackLoadName|JackUseExactName)
00325 
00330 typedef enum JackOptions jack_options_t;
00331 
00335 enum JackStatus {
00336 
00340      JackFailure = 0x01,
00341 
00345      JackInvalidOption = 0x02,
00346 
00356      JackNameNotUnique = 0x04,
00357 
00364      JackServerStarted = 0x08,
00365 
00369      JackServerFailed = 0x10,
00370 
00374      JackServerError = 0x20,
00375 
00379      JackNoSuchClient = 0x40,
00380 
00384      JackLoadFailure = 0x80,
00385 
00389      JackInitFailure = 0x100,
00390 
00394      JackShmFailure = 0x200,
00395 
00399      JackVersionError = 0x400
00400 };
00401 
00406 typedef enum JackStatus jack_status_t;
00407 
00408 #endif /* __jack_types_h__ */

Generated on Wed Apr 22 16:18:46 2009 for JACK-AUDIO-CONNECTION-KIT by  doxygen 1.5.8