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

JACK-AUDIO-CONNECTION-KIT

Loading...
Searching...
No Matches
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
54typedef 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
66typedef uint64_t jack_time_t;
67
72#define JACK_LOAD_INIT_LIMIT 1024
73
79typedef jack_uuid_t jack_intclient_t;
80
85typedef struct _jack_port jack_port_t;
86
91typedef struct _jack_client jack_client_t;
92
97typedef uint32_t jack_port_id_t;
98
100 * @ref jack_options_t bits
101 */
102enum JackOptions {
103
107 JackNullOption = 0x00,
108
115 JackNoStartServer = 0x01,
116
121 JackUseExactName = 0x02,
122
126 JackServerName = 0x04,
127
132 JackLoadName = 0x08,
133
138 JackLoadInit = 0x10,
139
143 JackSessionID = 0x20
144};
145
147#define JackOpenOptions (JackSessionID|JackServerName|JackNoStartServer|JackUseExactName)
148
150#define JackLoadOptions (JackLoadInit|JackLoadName|JackUseExactName)
151
156typedef enum JackOptions jack_options_t;
157
159 * @ref jack_status_t bits
160 */
161enum JackStatus {
162
166 JackFailure = 0x01,
167
171 JackInvalidOption = 0x02,
172
182 JackNameNotUnique = 0x04,
183
190 JackServerStarted = 0x08,
191
195 JackServerFailed = 0x10,
196
200 JackServerError = 0x20,
201
205 JackNoSuchClient = 0x40,
206
210 JackLoadFailure = 0x80,
211
215 JackInitFailure = 0x100,
216
220 JackShmFailure = 0x200,
221
225 JackVersionError = 0x400,
226
227 /*
228 * BackendError
229 */
230 JackBackendError = 0x800,
231
232 /*
233 * Client is being shutdown against its will
234 */
235 JackClientZombie = 0x1000
236};
237
242typedef enum JackStatus jack_status_t;
243
245 * @ref jack_latency_callback_mode_t
246 */
247enum JackLatencyCallbackMode {
248
254 JackCaptureLatency,
255
261 JackPlaybackLatency
262
263};
264
268typedef enum JackLatencyCallbackMode jack_latency_callback_mode_t;
269
277typedef void (*JackLatencyCallback)(jack_latency_callback_mode_t mode, void *arg);
278
280 * the new latency API operates on Ranges.
281 */
282struct _jack_latency_range
283{
287 jack_nframes_t min;
291 jack_nframes_t max;
292};
293
294typedef struct _jack_latency_range jack_latency_range_t;
295
308typedef int (*JackProcessCallback)(jack_nframes_t nframes, void *arg);
309
322typedef void (*JackThreadInitCallback)(void *arg);
323
332typedef int (*JackGraphOrderCallback)(void *arg);
333
344typedef int (*JackXRunCallback)(void *arg);
345
360typedef int (*JackBufferSizeCallback)(jack_nframes_t nframes, void *arg);
361
371typedef int (*JackSampleRateCallback)(jack_nframes_t nframes, void *arg);
372
382typedef void (*JackPortRegistrationCallback)(jack_port_id_t port, int /* register */, void *arg);
383
393typedef void (*JackPortRenameCallback)(jack_port_id_t port, const char* old_name, const char* new_name, void* arg);
394
404typedef void (*JackClientRegistrationCallback)(const char* name, int /* register */, void *arg);
405
416typedef void (*JackPortConnectCallback)(jack_port_id_t a, jack_port_id_t b, int connect, void* arg);
417
425 typedef void (*JackFreewheelCallback)(int starting, void *arg);
426
427typedef void *(*JackThreadCallback)(void* arg);
428
440typedef void (*JackShutdownCallback)(void *arg);
441
455typedef void (*JackInfoShutdownCallback)(jack_status_t code, const char* reason, void *arg);
456
461#define JACK_DEFAULT_AUDIO_TYPE "32 bit float mono audio"
462#define JACK_DEFAULT_MIDI_TYPE "8 bit raw midi"
463
469typedef float jack_default_audio_sample_t;
470
475 * them both.
476 */
477enum JackPortFlags {
478
483 JackPortIsInput = 0x1,
484
489 JackPortIsOutput = 0x2,
490
495 JackPortIsPhysical = 0x4,
496
510 JackPortCanMonitor = 0x8,
511
526 JackPortIsTerminal = 0x10
527};
528
529
530#endif /* __jack_types_h__ */
_jack_latency_range
Definition types.h:281
_jack_latency_range::max
jack_nframes_t max
Definition types.h:289
_jack_latency_range::min
jack_nframes_t min
Definition types.h:285
JackSampleRateCallback
int(* JackSampleRateCallback)(jack_nframes_t nframes, void *arg)
Definition types.h:369
jack_options_t
enum JackOptions jack_options_t
Definition types.h:154
JackShutdownCallback
void(* JackShutdownCallback)(void *arg)
Definition types.h:438
JackFreewheelCallback
void(* JackFreewheelCallback)(int starting, void *arg)
Definition types.h:423
jack_uuid_t
uint64_t jack_uuid_t
Definition types.h:27
JackPortConnectCallback
void(* JackPortConnectCallback)(jack_port_id_t a, jack_port_id_t b, int connect, void *arg)
Definition types.h:414
JackThreadInitCallback
void(* JackThreadInitCallback)(void *arg)
Definition types.h:320
JackOptions
JackOptions
Definition types.h:100
JackLoadInit
@ JackLoadInit
Definition types.h:136
JackServerName
@ JackServerName
Definition types.h:124
JackUseExactName
@ JackUseExactName
Definition types.h:119
JackNoStartServer
@ JackNoStartServer
Definition types.h:113
JackLoadName
@ JackLoadName
Definition types.h:130
JackNullOption
@ JackNullOption
Definition types.h:105
JackSessionID
@ JackSessionID
Definition types.h:141
jack_status_t
enum JackStatus jack_status_t
Definition types.h:240
jack_port_id_t
uint32_t jack_port_id_t
Definition types.h:95
JackLatencyCallbackMode
JackLatencyCallbackMode
Definition types.h:245
JackPlaybackLatency
@ JackPlaybackLatency
Definition types.h:259
JackCaptureLatency
@ JackCaptureLatency
Definition types.h:252
jack_latency_range_t
struct _jack_latency_range jack_latency_range_t
Definition types.h:292
jack_intclient_t
jack_uuid_t jack_intclient_t
Definition types.h:77
jack_port_t
struct _jack_port jack_port_t
Definition types.h:83
JackClientRegistrationCallback
void(* JackClientRegistrationCallback)(const char *name, int, void *arg)
Definition types.h:402
jack_client_t
struct _jack_client jack_client_t
Definition types.h:89
jack_nframes_t
uint32_t jack_nframes_t
Definition types.h:53
JackBufferSizeCallback
int(* JackBufferSizeCallback)(jack_nframes_t nframes, void *arg)
Definition types.h:358
JackStatus
JackStatus
Definition types.h:159
JackServerError
@ JackServerError
Definition types.h:198
JackNameNotUnique
@ JackNameNotUnique
Definition types.h:180
JackFailure
@ JackFailure
Definition types.h:164
JackLoadFailure
@ JackLoadFailure
Definition types.h:208
JackBackendError
@ JackBackendError
Definition types.h:228
JackServerStarted
@ JackServerStarted
Definition types.h:188
JackVersionError
@ JackVersionError
Definition types.h:223
JackInitFailure
@ JackInitFailure
Definition types.h:213
JackServerFailed
@ JackServerFailed
Definition types.h:193
JackInvalidOption
@ JackInvalidOption
Definition types.h:169
JackNoSuchClient
@ JackNoSuchClient
Definition types.h:203
JackShmFailure
@ JackShmFailure
Definition types.h:218
JackClientZombie
@ JackClientZombie
Definition types.h:233
jack_shmsize_t
int32_t jack_shmsize_t
Definition types.h:29
JackPortRenameCallback
void(* JackPortRenameCallback)(jack_port_id_t port, const char *old_name, const char *new_name, void *arg)
Definition types.h:391
JackPortRegistrationCallback
void(* JackPortRegistrationCallback)(jack_port_id_t port, int, void *arg)
Definition types.h:380
JackProcessCallback
int(* JackProcessCallback)(jack_nframes_t nframes, void *arg)
Definition types.h:306
JackLatencyCallback
void(* JackLatencyCallback)(jack_latency_callback_mode_t mode, void *arg)
Definition types.h:275
JackXRunCallback
int(* JackXRunCallback)(void *arg)
Definition types.h:342
JackGraphOrderCallback
int(* JackGraphOrderCallback)(void *arg)
Definition types.h:330
JackPortFlags
JackPortFlags
Definition types.h:475
JackPortCanMonitor
@ JackPortCanMonitor
Definition types.h:508
JackPortIsPhysical
@ JackPortIsPhysical
Definition types.h:493
JackPortIsInput
@ JackPortIsInput
Definition types.h:481
JackPortIsOutput
@ JackPortIsOutput
Definition types.h:487
JackPortIsTerminal
@ JackPortIsTerminal
Definition types.h:524
JackInfoShutdownCallback
void(* JackInfoShutdownCallback)(jack_status_t code, const char *reason, void *arg)
Definition types.h:453
jack_latency_callback_mode_t
enum JackLatencyCallbackMode jack_latency_callback_mode_t
Definition types.h:266
jack_default_audio_sample_t
float jack_default_audio_sample_t
Definition types.h:467
jack_time_t
uint64_t jack_time_t
Definition types.h:64