JACK-AUDIO-CONNECTION-KIT: types.h Source File

JACK-AUDIO-CONNECTION-KIT 0.125.0

types.h
Go to the documentation of this file.
1 /*
2 Copyright (C) 2001 Paul Davis
3 Copyright (C) 2004 Jack O'Quin
4
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as published by
7 the Free Software Foundation; either version 2.1 of the License, or
8 (at your option) any later version.
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18
19 */
20
21 #ifndef __jack_types_h__
22 #define __jack_types_h__
23
24 #include <inttypes.h>
25 #include <pthread.h>
26
27 typedef uint64_t jack_uuid_t;
28
29 typedef int32_t jack_shmsize_t;
30
31 #ifndef
32 #ifdef __GNUC__
33 /* needs to be a macro which
34 expands into a compiler directive. The directive must
35 tell the compiler to arrange the preceding structure
36 declaration so that it is packed on byte-boundaries rather
37 than use the natural alignment of the processor and/or
38 compiler.
39 */
40 #ifdef __arm__
41 # define
42 #else
43 # define __attribute__((__packed__))
44 #endif /* ARM */
45 #else
46 /* Add other things here for non-gcc platforms */
47 #endif
48 #endif
49
50
54 typedef uint32_t jack_nframes_t;
55
59 #define JACK_MAX_FRAMES (4294967295U) /* This should be UINT32_MAX, but
60 C++ has a problem with that. */
61
66 typedef uint64_t jack_time_t;
67
72 #define JACK_LOAD_INIT_LIMIT 1024
73
79 typedef jack_uuid_t jack_intclient_t;
80
85 typedef struct _jack_port jack_port_t;
86
91 typedef struct _jack_client jack_client_t;
92
97 typedef uint32_t jack_port_id_t;
98
104 typedef pthread_t jack_native_thread_t;
105
109 enum JackOptions {
110
114 JackNullOption = 0x00,
115
122 JackNoStartServer = 0x01,
123
128 JackUseExactName = 0x02,
129
133 JackServerName = 0x04,
134
139 JackLoadName = 0x08,
140
145 JackLoadInit = 0x10,
146
150 JackSessionID = 0x20
151 };
152
154 #define JackOpenOptions (JackSessionID|JackServerName|JackNoStartServer|JackUseExactName)
155
157 #define JackLoadOptions (JackLoadInit|JackLoadName|JackUseExactName)
158
163 typedef enum JackOptions jack_options_t;
164
168 enum JackStatus {
169
173 JackFailure = 0x01,
174
178 JackInvalidOption = 0x02,
179
189 JackNameNotUnique = 0x04,
190
197 JackServerStarted = 0x08,
198
202 JackServerFailed = 0x10,
203
207 JackServerError = 0x20,
208
212 JackNoSuchClient = 0x40,
213
217 JackLoadFailure = 0x80,
218
222 JackInitFailure = 0x100,
223
227 JackShmFailure = 0x200,
228
232 JackVersionError = 0x400,
233
234 /*
235 * BackendError
236 */
237 JackBackendError = 0x800,
238
239 /*
240 * Client is being shutdown against its will
241 */
242 JackClientZombie = 0x1000
243 };
244
249 typedef enum JackStatus jack_status_t;
250
254 enum JackLatencyCallbackMode {
255
261 JackCaptureLatency,
262
268 JackPlaybackLatency
269
270 };
271
275 typedef enum JackLatencyCallbackMode jack_latency_callback_mode_t;
276
284 typedef void (*JackLatencyCallback)(jack_latency_callback_mode_t mode, void *arg);
285
289 struct _jack_latency_range
290 {
294 jack_nframes_t min;
298 jack_nframes_t max;
299 };
300
301 typedef struct _jack_latency_range jack_latency_range_t;
302
315 typedef int (*JackProcessCallback)(jack_nframes_t nframes, void *arg);
316
329 typedef void (*JackThreadInitCallback)(void *arg);
330
339 typedef int (*JackGraphOrderCallback)(void *arg);
340
351 typedef int (*JackXRunCallback)(void *arg);
352
367 typedef int (*JackBufferSizeCallback)(jack_nframes_t nframes, void *arg);
368
378 typedef int (*JackSampleRateCallback)(jack_nframes_t nframes, void *arg);
379
389 typedef void (*JackPortRegistrationCallback)(jack_port_id_t port, int register, void *arg);
390
400 typedef void (*JackPortRenameCallback)(jack_port_id_t port, const char* old_name, const char* new_name, void* arg);
401
411 typedef void (*JackClientRegistrationCallback)(const char* name, int register, void *arg);
412
423 typedef void (*JackPortConnectCallback)(jack_port_id_t a, jack_port_id_t b, int connect, void* arg);
424
432 typedef void (*JackFreewheelCallback)(int starting, void *arg);
433
434 typedef void *(*JackThreadCallback)(void* arg);
435
447 typedef void (*JackShutdownCallback)(void *arg);
448
462 typedef void (*JackInfoShutdownCallback)(jack_status_t code, const char* reason, void *arg);
463
468 #define JACK_DEFAULT_AUDIO_TYPE "32 bit float mono audio"
469 #define JACK_DEFAULT_MIDI_TYPE "8 bit raw midi"
470
476 typedef float jack_default_audio_sample_t;
477
484 enum JackPortFlags {
485
490 JackPortIsInput = 0x1,
491
496 JackPortIsOutput = 0x2,
497
502 JackPortIsPhysical = 0x4,
503
517 JackPortCanMonitor = 0x8,
518
533 JackPortIsTerminal = 0x10
534 };
535
536
537 #endif /* __jack_types_h__ */
JackProcessCallback
int(* JackProcessCallback)(jack_nframes_t nframes, void *arg)
Definition: types.h:314
JackFailure
Definition: types.h:172
JackStatus
JackStatus
Definition: types.h:167
jack_status_t
enum JackStatus jack_status_t
Definition: types.h:248
JackVersionError
Definition: types.h:231
JackInitFailure
Definition: types.h:221
JackServerError
Definition: types.h:206
JackGraphOrderCallback
int(* JackGraphOrderCallback)(void *arg)
Definition: types.h:338
JackLoadFailure
Definition: types.h:216
JackPortIsInput
Definition: types.h:489
JackUseExactName
Definition: types.h:127
JackPortRegistrationCallback
void(* JackPortRegistrationCallback)(jack_port_id_t port, int register, void *arg)
Definition: types.h:388
jack_port_t
struct _jack_port jack_port_t
Definition: types.h:84
_jack_latency_range::min
jack_nframes_t min
Definition: types.h:293
_jack_latency_range
Definition: types.h:288
JackSampleRateCallback
int(* JackSampleRateCallback)(jack_nframes_t nframes, void *arg)
Definition: types.h:377
jack_client_t
struct _jack_client jack_client_t
Definition: types.h:90
JackInvalidOption
Definition: types.h:177
jack_port_id_t
uint32_t jack_port_id_t
Definition: types.h:96
JackPortIsPhysical
Definition: types.h:501
jack_native_thread_t
pthread_t jack_native_thread_t
Definition: types.h:103
jack_options_t
enum JackOptions jack_options_t
Definition: types.h:162
JackPortIsOutput
Definition: types.h:495
JackXRunCallback
int(* JackXRunCallback)(void *arg)
Definition: types.h:350
JackShutdownCallback
void(* JackShutdownCallback)(void *arg)
Definition: types.h:446
JackPortFlags
JackPortFlags
Definition: types.h:483
jack_time_t
uint64_t jack_time_t
Definition: types.h:65
JackLatencyCallback
void(* JackLatencyCallback)(jack_latency_callback_mode_t mode, void *arg)
Definition: types.h:283
JackNoSuchClient
Definition: types.h:211
jack_default_audio_sample_t
float jack_default_audio_sample_t
Definition: types.h:475
_jack_latency_range::max
jack_nframes_t max
Definition: types.h:297
JackOptions
JackOptions
Definition: types.h:108
JackClientZombie
Definition: types.h:241
JackServerStarted
Definition: types.h:196
JackServerName
Definition: types.h:132
jack_nframes_t
uint32_t jack_nframes_t
Definition: types.h:53
JackThreadInitCallback
void(* JackThreadInitCallback)(void *arg)
Definition: types.h:328
JackShmFailure
Definition: types.h:226
JackPortRenameCallback
void(* JackPortRenameCallback)(jack_port_id_t port, const char *old_name, const char *new_name, void *arg)
Definition: types.h:399
JackLatencyCallbackMode
JackLatencyCallbackMode
Definition: types.h:253
JackPortIsTerminal
Definition: types.h:532
JackClientRegistrationCallback
void(* JackClientRegistrationCallback)(const char *name, int register, void *arg)
Definition: types.h:410
jack_uuid_t
uint64_t jack_uuid_t
Definition: types.h:27
JackLoadName
Definition: types.h:138
JackInfoShutdownCallback
void(* JackInfoShutdownCallback)(jack_status_t code, const char *reason, void *arg)
Definition: types.h:461
jack_intclient_t
jack_uuid_t jack_intclient_t
Definition: types.h:78
JackPortCanMonitor
Definition: types.h:516
jack_latency_callback_mode_t
enum JackLatencyCallbackMode jack_latency_callback_mode_t
Definition: types.h:274
JackServerFailed
Definition: types.h:201
JackNoStartServer
Definition: types.h:121
jack_shmsize_t
int32_t jack_shmsize_t
Definition: types.h:29
JackNullOption
Definition: types.h:113
JackBackendError
Definition: types.h:236
JackFreewheelCallback
void(* JackFreewheelCallback)(int starting, void *arg)
Definition: types.h:431
JackCaptureLatency
Definition: types.h:260
JackPlaybackLatency
Definition: types.h:267
JackBufferSizeCallback
int(* JackBufferSizeCallback)(jack_nframes_t nframes, void *arg)
Definition: types.h:366
JackLoadInit
Definition: types.h:144
JackNameNotUnique
Definition: types.h:188
JackSessionID
Definition: types.h:149
JackPortConnectCallback
void(* JackPortConnectCallback)(jack_port_id_t a, jack_port_id_t b, int connect, void *arg)
Definition: types.h:422