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
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
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};
152
154#define JackOpenOptions (JackSessionID|JackServerName|JackNoStartServer|JackUseExactName)
155
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
254enum JackLatencyCallbackMode {
255
261 JackCaptureLatency,
262
268 JackPlaybackLatency
269
270};
271
275typedef enum JackLatencyCallbackMode jack_latency_callback_mode_t;
276
284typedef void (*JackLatencyCallback)(jack_latency_callback_mode_t mode, void *arg);
285
289struct _jack_latency_range
290{
294 jack_nframes_t min;
298 jack_nframes_t max;
299};
300
301typedef struct _jack_latency_range jack_latency_range_t;
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
432 typedef 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__ */
_jack_latency_range
Definition types.h:288
_jack_latency_range::max
jack_nframes_t max
Definition types.h:296
_jack_latency_range::min
jack_nframes_t min
Definition types.h:292
JackSampleRateCallback
int(* JackSampleRateCallback)(jack_nframes_t nframes, void *arg)
Definition types.h:376
jack_options_t
enum JackOptions jack_options_t
Definition types.h:161
JackShutdownCallback
void(* JackShutdownCallback)(void *arg)
Definition types.h:445
JackFreewheelCallback
void(* JackFreewheelCallback)(int starting, void *arg)
Definition types.h:430
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:421
JackThreadInitCallback
void(* JackThreadInitCallback)(void *arg)
Definition types.h:327
JackOptions
JackOptions
Definition types.h:107
JackLoadInit
@ JackLoadInit
Definition types.h:143
JackServerName
@ JackServerName
Definition types.h:131
JackUseExactName
@ JackUseExactName
Definition types.h:126
JackNoStartServer
@ JackNoStartServer
Definition types.h:120
JackLoadName
@ JackLoadName
Definition types.h:137
JackNullOption
@ JackNullOption
Definition types.h:112
JackSessionID
@ JackSessionID
Definition types.h:148
JackClientRegistrationCallback
void(* JackClientRegistrationCallback)(const char *name, int register, void *arg)
Definition types.h:409
jack_status_t
enum JackStatus jack_status_t
Definition types.h:247
jack_port_id_t
uint32_t jack_port_id_t
Definition types.h:95
JackLatencyCallbackMode
JackLatencyCallbackMode
Definition types.h:252
JackPlaybackLatency
@ JackPlaybackLatency
Definition types.h:266
JackCaptureLatency
@ JackCaptureLatency
Definition types.h:259
JackPortRegistrationCallback
void(* JackPortRegistrationCallback)(jack_port_id_t port, int register, void *arg)
Definition types.h:387
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
jack_client_t
struct _jack_client jack_client_t
Definition types.h:89
jack_native_thread_t
pthread_t jack_native_thread_t
Definition types.h:102
jack_nframes_t
uint32_t jack_nframes_t
Definition types.h:53
JackBufferSizeCallback
int(* JackBufferSizeCallback)(jack_nframes_t nframes, void *arg)
Definition types.h:365
JackStatus
JackStatus
Definition types.h:166
JackServerError
@ JackServerError
Definition types.h:205
JackNameNotUnique
@ JackNameNotUnique
Definition types.h:187
JackFailure
@ JackFailure
Definition types.h:171
JackLoadFailure
@ JackLoadFailure
Definition types.h:215
JackBackendError
@ JackBackendError
Definition types.h:235
JackServerStarted
@ JackServerStarted
Definition types.h:195
JackVersionError
@ JackVersionError
Definition types.h:230
JackInitFailure
@ JackInitFailure
Definition types.h:220
JackServerFailed
@ JackServerFailed
Definition types.h:200
JackInvalidOption
@ JackInvalidOption
Definition types.h:176
JackNoSuchClient
@ JackNoSuchClient
Definition types.h:210
JackShmFailure
@ JackShmFailure
Definition types.h:225
JackClientZombie
@ JackClientZombie
Definition types.h:240
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:398
JackProcessCallback
int(* JackProcessCallback)(jack_nframes_t nframes, void *arg)
Definition types.h:313
JackLatencyCallback
void(* JackLatencyCallback)(jack_latency_callback_mode_t mode, void *arg)
Definition types.h:282
JackXRunCallback
int(* JackXRunCallback)(void *arg)
Definition types.h:349
JackGraphOrderCallback
int(* JackGraphOrderCallback)(void *arg)
Definition types.h:337
JackPortFlags
JackPortFlags
Definition types.h:482
JackPortCanMonitor
@ JackPortCanMonitor
Definition types.h:515
JackPortIsPhysical
@ JackPortIsPhysical
Definition types.h:500
JackPortIsInput
@ JackPortIsInput
Definition types.h:488
JackPortIsOutput
@ JackPortIsOutput
Definition types.h:494
JackPortIsTerminal
@ JackPortIsTerminal
Definition types.h:531
JackInfoShutdownCallback
void(* JackInfoShutdownCallback)(jack_status_t code, const char *reason, void *arg)
Definition types.h:460
jack_latency_callback_mode_t
enum JackLatencyCallbackMode jack_latency_callback_mode_t
Definition types.h:273
jack_default_audio_sample_t
float jack_default_audio_sample_t
Definition types.h:474
jack_time_t
uint64_t jack_time_t
Definition types.h:64