JACK-AUDIO-CONNECTION-KIT 0.120.1
|
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 00225 enum JackLatencyCallbackMode { 00226 00232 JackCaptureLatency, 00233 00239 JackPlaybackLatency 00240 00241 }; 00242 00246 typedef enum JackLatencyCallbackMode jack_latency_callback_mode_t; 00247 00257 typedef int (*JackLatencyCallback)(jack_latency_callback_mode_t mode, void *arg); 00258 00262 struct _jack_latency_range 00263 { 00267 jack_nframes_t min; 00271 jack_nframes_t max; 00272 }; 00273 00274 typedef struct _jack_latency_range jack_latency_range_t; 00275 00288 typedef int (*JackProcessCallback)(jack_nframes_t nframes, void *arg); 00289 00302 typedef void (*JackThreadInitCallback)(void *arg); 00303 00312 typedef int (*JackGraphOrderCallback)(void *arg); 00313 00324 typedef int (*JackXRunCallback)(void *arg); 00325 00340 typedef int (*JackBufferSizeCallback)(jack_nframes_t nframes, void *arg); 00341 00351 typedef int (*JackSampleRateCallback)(jack_nframes_t nframes, void *arg); 00352 00362 typedef void (*JackPortRegistrationCallback)(jack_port_id_t port, int register, void *arg); 00363 00373 typedef void (*JackClientRegistrationCallback)(const char* name, int register, void *arg); 00374 00385 typedef void (*JackPortConnectCallback)(jack_port_id_t a, jack_port_id_t b, int connect, void* arg); 00386 00394 typedef void (*JackFreewheelCallback)(int starting, void *arg); 00395 00396 typedef void *(*JackThreadCallback)(void* arg); 00397 00409 typedef void (*JackShutdownCallback)(void *arg); 00410 00424 typedef void (*JackInfoShutdownCallback)(jack_status_t code, const char* reason, void *arg); 00425 00430 #define JACK_DEFAULT_AUDIO_TYPE "32 bit float mono audio" 00431 #define JACK_DEFAULT_MIDI_TYPE "8 bit raw midi" 00432 00438 typedef float jack_default_audio_sample_t; 00439 00446 enum JackPortFlags { 00447 00452 JackPortIsInput = 0x1, 00453 00458 JackPortIsOutput = 0x2, 00459 00464 JackPortIsPhysical = 0x4, 00465 00479 JackPortCanMonitor = 0x8, 00480 00495 JackPortIsTerminal = 0x10 00496 }; 00497 00498 00499 #endif /* __jack_types_h__ */ 00500