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 #include <pthread.h> 00026 00027 typedef int32_t jack_shmsize_t; 00028 00032 typedef uint32_t jack_nframes_t; 00033 00037 #define JACK_MAX_FRAMES (4294967295U) /* This should be UINT32_MAX, but 00038 C++ has a problem with that. */ 00039 00044 typedef uint64_t jack_time_t; 00045 00050 #define JACK_LOAD_INIT_LIMIT 1024 00051 00057 typedef uint64_t jack_intclient_t; 00058 00063 typedef struct _jack_port jack_port_t; 00064 00069 typedef struct _jack_client jack_client_t; 00070 00075 typedef uint32_t jack_port_id_t; 00076 00082 typedef pthread_t jack_native_thread_t; 00083 00087 enum JackOptions { 00088 00092 JackNullOption = 0x00, 00093 00100 JackNoStartServer = 0x01, 00101 00106 JackUseExactName = 0x02, 00107 00111 JackServerName = 0x04, 00112 00117 JackLoadName = 0x08, 00118 00123 JackLoadInit = 0x10, 00124 00128 JackSessionID = 0x20 00129 }; 00130 00132 #define JackOpenOptions (JackSessionID|JackServerName|JackNoStartServer|JackUseExactName) 00133 00135 #define JackLoadOptions (JackLoadInit|JackLoadName|JackUseExactName) 00136 00141 typedef enum JackOptions jack_options_t; 00142 00146 enum JackStatus { 00147 00151 JackFailure = 0x01, 00152 00156 JackInvalidOption = 0x02, 00157 00167 JackNameNotUnique = 0x04, 00168 00175 JackServerStarted = 0x08, 00176 00180 JackServerFailed = 0x10, 00181 00185 JackServerError = 0x20, 00186 00190 JackNoSuchClient = 0x40, 00191 00195 JackLoadFailure = 0x80, 00196 00200 JackInitFailure = 0x100, 00201 00205 JackShmFailure = 0x200, 00206 00210 JackVersionError = 0x400, 00211 00212 /* 00213 * BackendError 00214 */ 00215 JackBackendError = 0x800, 00216 00217 /* 00218 * Client is being shutdown against its will 00219 */ 00220 JackClientZombie = 0x1000 00221 }; 00222 00227 typedef enum JackStatus jack_status_t; 00228 00232 enum JackLatencyCallbackMode { 00233 00239 JackCaptureLatency, 00240 00246 JackPlaybackLatency 00247 00248 }; 00249 00253 typedef enum JackLatencyCallbackMode jack_latency_callback_mode_t; 00254 00264 typedef void (*JackLatencyCallback)(jack_latency_callback_mode_t mode, void *arg); 00265 00269 struct _jack_latency_range 00270 { 00274 jack_nframes_t min; 00278 jack_nframes_t max; 00279 }; 00280 00281 typedef struct _jack_latency_range jack_latency_range_t; 00282 00295 typedef int (*JackProcessCallback)(jack_nframes_t nframes, void *arg); 00296 00309 typedef void (*JackThreadInitCallback)(void *arg); 00310 00319 typedef int (*JackGraphOrderCallback)(void *arg); 00320 00331 typedef int (*JackXRunCallback)(void *arg); 00332 00347 typedef int (*JackBufferSizeCallback)(jack_nframes_t nframes, void *arg); 00348 00358 typedef int (*JackSampleRateCallback)(jack_nframes_t nframes, void *arg); 00359 00369 typedef void (*JackPortRegistrationCallback)(jack_port_id_t port, int register, void *arg); 00370 00380 typedef void (*JackClientRegistrationCallback)(const char* name, int register, void *arg); 00381 00392 typedef void (*JackPortConnectCallback)(jack_port_id_t a, jack_port_id_t b, int connect, void* arg); 00393 00401 typedef void (*JackFreewheelCallback)(int starting, void *arg); 00402 00403 typedef void *(*JackThreadCallback)(void* arg); 00404 00416 typedef void (*JackShutdownCallback)(void *arg); 00417 00431 typedef void (*JackInfoShutdownCallback)(jack_status_t code, const char* reason, void *arg); 00432 00437 #define JACK_DEFAULT_AUDIO_TYPE "32 bit float mono audio" 00438 #define JACK_DEFAULT_MIDI_TYPE "8 bit raw midi" 00439 00445 typedef float jack_default_audio_sample_t; 00446 00453 enum JackPortFlags { 00454 00459 JackPortIsInput = 0x1, 00460 00465 JackPortIsOutput = 0x2, 00466 00471 JackPortIsPhysical = 0x4, 00472 00486 JackPortCanMonitor = 0x8, 00487 00502 JackPortIsTerminal = 0x10 00503 }; 00504 00505 00506 #endif /* __jack_types_h__ */ 00507