JACK-AUDIO-CONNECTION-KIT 0.124.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 #include <pthread.h> 00026 #include <uuid/uuid.h> 00027 00028 typedef uint64_t jack_uuid_t; 00029 00030 typedef int32_t jack_shmsize_t; 00031 00035 typedef uint32_t jack_nframes_t; 00036 00040 #define JACK_MAX_FRAMES (4294967295U) /* This should be UINT32_MAX, but 00041 C++ has a problem with that. */ 00042 00047 typedef uint64_t jack_time_t; 00048 00053 #define JACK_LOAD_INIT_LIMIT 1024 00054 00060 typedef jack_uuid_t jack_intclient_t; 00061 00066 typedef struct _jack_port jack_port_t; 00067 00072 typedef struct _jack_client jack_client_t; 00073 00078 typedef uint32_t jack_port_id_t; 00079 00085 typedef pthread_t jack_native_thread_t; 00086 00090 enum JackOptions { 00091 00095 JackNullOption = 0x00, 00096 00103 JackNoStartServer = 0x01, 00104 00109 JackUseExactName = 0x02, 00110 00114 JackServerName = 0x04, 00115 00120 JackLoadName = 0x08, 00121 00126 JackLoadInit = 0x10, 00127 00131 JackSessionID = 0x20 00132 }; 00133 00135 #define JackOpenOptions (JackSessionID|JackServerName|JackNoStartServer|JackUseExactName) 00136 00138 #define JackLoadOptions (JackLoadInit|JackLoadName|JackUseExactName) 00139 00144 typedef enum JackOptions jack_options_t; 00145 00149 enum JackStatus { 00150 00154 JackFailure = 0x01, 00155 00159 JackInvalidOption = 0x02, 00160 00170 JackNameNotUnique = 0x04, 00171 00178 JackServerStarted = 0x08, 00179 00183 JackServerFailed = 0x10, 00184 00188 JackServerError = 0x20, 00189 00193 JackNoSuchClient = 0x40, 00194 00198 JackLoadFailure = 0x80, 00199 00203 JackInitFailure = 0x100, 00204 00208 JackShmFailure = 0x200, 00209 00213 JackVersionError = 0x400, 00214 00215 /* 00216 * BackendError 00217 */ 00218 JackBackendError = 0x800, 00219 00220 /* 00221 * Client is being shutdown against its will 00222 */ 00223 JackClientZombie = 0x1000 00224 }; 00225 00230 typedef enum JackStatus jack_status_t; 00231 00235 enum JackLatencyCallbackMode { 00236 00242 JackCaptureLatency, 00243 00249 JackPlaybackLatency 00250 00251 }; 00252 00256 typedef enum JackLatencyCallbackMode jack_latency_callback_mode_t; 00257 00267 typedef void (*JackLatencyCallback)(jack_latency_callback_mode_t mode, void *arg); 00268 00272 struct _jack_latency_range 00273 { 00277 jack_nframes_t min; 00281 jack_nframes_t max; 00282 }; 00283 00284 typedef struct _jack_latency_range jack_latency_range_t; 00285 00298 typedef int (*JackProcessCallback)(jack_nframes_t nframes, void *arg); 00299 00312 typedef void (*JackThreadInitCallback)(void *arg); 00313 00322 typedef int (*JackGraphOrderCallback)(void *arg); 00323 00334 typedef int (*JackXRunCallback)(void *arg); 00335 00350 typedef int (*JackBufferSizeCallback)(jack_nframes_t nframes, void *arg); 00351 00361 typedef int (*JackSampleRateCallback)(jack_nframes_t nframes, void *arg); 00362 00372 typedef void (*JackPortRegistrationCallback)(jack_port_id_t port, int register, void *arg); 00373 00383 typedef void (*JackPortRenameCallback)(jack_port_id_t port, const char* old_name, const char* new_name, void* arg); 00384 00394 typedef void (*JackClientRegistrationCallback)(const char* name, int register, void *arg); 00395 00406 typedef void (*JackPortConnectCallback)(jack_port_id_t a, jack_port_id_t b, int connect, void* arg); 00407 00415 typedef void (*JackFreewheelCallback)(int starting, void *arg); 00416 00417 typedef void *(*JackThreadCallback)(void* arg); 00418 00430 typedef void (*JackShutdownCallback)(void *arg); 00431 00445 typedef void (*JackInfoShutdownCallback)(jack_status_t code, const char* reason, void *arg); 00446 00451 #define JACK_DEFAULT_AUDIO_TYPE "32 bit float mono audio" 00452 #define JACK_DEFAULT_MIDI_TYPE "8 bit raw midi" 00453 00459 typedef float jack_default_audio_sample_t; 00460 00467 enum JackPortFlags { 00468 00473 JackPortIsInput = 0x1, 00474 00479 JackPortIsOutput = 0x2, 00480 00485 JackPortIsPhysical = 0x4, 00486 00500 JackPortCanMonitor = 0x8, 00501 00516 JackPortIsTerminal = 0x10 00517 }; 00518 00519 00520 #endif /* __jack_types_h__ */ 00521