JACK-AUDIO-CONNECTION-KIT 0.125.0rc1
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
27typedef uint64_t jack_uuid_t;
28
29typedef 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
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
104typedef pthread_t jack_native_thread_t;
105
109enum 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};
154#define JackOpenOptions (JackSessionID|JackServerName|JackNoStartServer|JackUseExactName)
157#define JackLoadOptions (JackLoadInit|JackLoadName|JackUseExactName)
158
163typedef enum JackOptions jack_options_t;
164
168enum 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
249typedef enum JackStatus jack_status_t;
250
255
262
269
270};
271
276
284typedef void (*JackLatencyCallback)(jack_latency_callback_mode_t mode, void *arg);
285
290{
300
302
315typedef int (*JackProcessCallback)(jack_nframes_t nframes, void *arg);
316
329typedef void (*JackThreadInitCallback)(void *arg);
330
339typedef int (*JackGraphOrderCallback)(void *arg);
340
351typedef int (*JackXRunCallback)(void *arg);
352
367typedef int (*JackBufferSizeCallback)(jack_nframes_t nframes, void *arg);
368
378typedef int (*JackSampleRateCallback)(jack_nframes_t nframes, void *arg);
379
389typedef void (*JackPortRegistrationCallback)(jack_port_id_t port, int register, void *arg);
390
400typedef void (*JackPortRenameCallback)(jack_port_id_t port, const char* old_name, const char* new_name, void* arg);
401
411typedef void (*JackClientRegistrationCallback)(const char* name, int register, void *arg);
412
423typedef void (*JackPortConnectCallback)(jack_port_id_t a, jack_port_id_t b, int connect, void* arg);
424
432typedef void (*JackFreewheelCallback)(int starting, void *arg);
433
434typedef void *(*JackThreadCallback)(void* arg);
435
447typedef void (*JackShutdownCallback)(void *arg);
448
462typedef 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
476typedef float jack_default_audio_sample_t;
477
484enum 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__ */
Definition types.h:288
jack_nframes_t max
Definition types.h:296
jack_nframes_t min
Definition types.h:292
int(* JackSampleRateCallback)(jack_nframes_t nframes, void *arg)
Definition types.h:376
enum JackOptions jack_options_t
Definition types.h:161
void(* JackShutdownCallback)(void *arg)
Definition types.h:445
void(* JackFreewheelCallback)(int starting, void *arg)
Definition types.h:430
uint64_t jack_uuid_t
Definition types.h:27
void(* JackPortConnectCallback)(jack_port_id_t a, jack_port_id_t b, int connect, void *arg)
Definition types.h:421
void(* JackThreadInitCallback)(void *arg)
Definition types.h:327
JackOptions
Definition types.h:107
@ JackLoadInit
Definition types.h:143
@ JackServerName
Definition types.h:131
@ JackUseExactName
Definition types.h:126
@ JackNoStartServer
Definition types.h:120
@ JackLoadName
Definition types.h:137
@ JackNullOption
Definition types.h:112
@ JackSessionID
Definition types.h:148
void(* JackClientRegistrationCallback)(const char *name, int register, void *arg)
Definition types.h:409
enum JackStatus jack_status_t
Definition types.h:247
uint32_t jack_port_id_t
Definition types.h:95
JackLatencyCallbackMode
Definition types.h:252
@ JackPlaybackLatency
Definition types.h:266
@ JackCaptureLatency
Definition types.h:259
void(* JackPortRegistrationCallback)(jack_port_id_t port, int register, void *arg)
Definition types.h:387
jack_uuid_t jack_intclient_t
Definition types.h:77
struct _jack_port jack_port_t
Definition types.h:83
struct _jack_client jack_client_t
Definition types.h:89
pthread_t jack_native_thread_t
Definition types.h:102
uint32_t jack_nframes_t
Definition types.h:53
int(* JackBufferSizeCallback)(jack_nframes_t nframes, void *arg)
Definition types.h:365
JackStatus
Definition types.h:166
@ JackServerError
Definition types.h:205
@ JackNameNotUnique
Definition types.h:187
@ JackFailure
Definition types.h:171
@ JackLoadFailure
Definition types.h:215
@ JackBackendError
Definition types.h:235
@ JackServerStarted
Definition types.h:195
@ JackVersionError
Definition types.h:230
@ JackInitFailure
Definition types.h:220
@ JackServerFailed
Definition types.h:200
@ JackInvalidOption
Definition types.h:176
@ JackNoSuchClient
Definition types.h:210
@ JackShmFailure
Definition types.h:225
@ JackClientZombie
Definition types.h:240
int32_t jack_shmsize_t
Definition types.h:29
void(* JackPortRenameCallback)(jack_port_id_t port, const char *old_name, const char *new_name, void *arg)
Definition types.h:398
int(* JackProcessCallback)(jack_nframes_t nframes, void *arg)
Definition types.h:313
void(* JackLatencyCallback)(jack_latency_callback_mode_t mode, void *arg)
Definition types.h:282
int(* JackXRunCallback)(void *arg)
Definition types.h:349
int(* JackGraphOrderCallback)(void *arg)
Definition types.h:337
JackPortFlags
Definition types.h:482
@ JackPortCanMonitor
Definition types.h:515
@ JackPortIsPhysical
Definition types.h:500
@ JackPortIsInput
Definition types.h:488
@ JackPortIsOutput
Definition types.h:494
@ JackPortIsTerminal
Definition types.h:531
void(* JackInfoShutdownCallback)(jack_status_t code, const char *reason, void *arg)
Definition types.h:460
enum JackLatencyCallbackMode jack_latency_callback_mode_t
Definition types.h:273
float jack_default_audio_sample_t
Definition types.h:474
uint64_t jack_time_t
Definition types.h:64