JACK-AUDIO-CONNECTION-KIT 0.121.3

- Main Page
- Related Pages
- Modules
- Data Structures
- Files

- File List
- Globals

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 int32_t jack_shmsize_t;
28
32 typedef uint32_t jack_nframes_t;
33
37 #define JACK_MAX_FRAMES (4294967295U) /* This should be UINT32_MAX, but
38 C++ has a problem with that. */
39
44 typedef uint64_t jack_time_t;
45
50 #define JACK_LOAD_INIT_LIMIT 1024
51
57 typedef uint64_t jack_intclient_t;
58
63 typedef struct _jack_port jack_port_t;
64
69 typedef struct _jack_client jack_client_t;
70
75 typedef uint32_t jack_port_id_t;
76
82 typedef pthread_t jack_native_thread_t;
83
87 enum JackOptions {
88
92 JackNullOption = 0x00,
93
100 JackNoStartServer = 0x01,
101
106 JackUseExactName = 0x02,
107
111 JackServerName = 0x04,
112
117 JackLoadName = 0x08,
118
123 JackLoadInit = 0x10,
124
128 JackSessionID = 0x20
129 };
130
132 #define JackOpenOptions (JackSessionID|JackServerName|JackNoStartServer|JackUseExactName)
133
135 #define JackLoadOptions (JackLoadInit|JackLoadName|JackUseExactName)
136
141 typedef enum JackOptions jack_options_t;
142
146 enum JackStatus {
147
151 JackFailure = 0x01,
152
156 JackInvalidOption = 0x02,
157
167 JackNameNotUnique = 0x04,
168
175 JackServerStarted = 0x08,
176
180 JackServerFailed = 0x10,
181
185 JackServerError = 0x20,
186
190 JackNoSuchClient = 0x40,
191
195 JackLoadFailure = 0x80,
196
200 JackInitFailure = 0x100,
201
205 JackShmFailure = 0x200,
206
210 JackVersionError = 0x400,
211
212 /*
213 * BackendError
214 */
215 JackBackendError = 0x800,
216
217 /*
218 * Client is being shutdown against its will
219 */
220 JackClientZombie = 0x1000
221 };
222
227 typedef enum JackStatus jack_status_t;
228
232 enum JackLatencyCallbackMode {
233
239 JackCaptureLatency,
240
246 JackPlaybackLatency
247
248 };
249
253 typedef enum JackLatencyCallbackMode jack_latency_callback_mode_t;
254
264 typedef void (*JackLatencyCallback)(jack_latency_callback_mode_t mode, void *arg);
265
269 struct _jack_latency_range
270 {
274 jack_nframes_t min;
278 jack_nframes_t max;
279 };
280
281 typedef struct _jack_latency_range jack_latency_range_t;
282
295 typedef int (*JackProcessCallback)(jack_nframes_t nframes, void *arg);
296
309 typedef void (*JackThreadInitCallback)(void *arg);
310
319 typedef int (*JackGraphOrderCallback)(void *arg);
320
331 typedef int (*JackXRunCallback)(void *arg);
332
347 typedef int (*JackBufferSizeCallback)(jack_nframes_t nframes, void *arg);
348
358 typedef int (*JackSampleRateCallback)(jack_nframes_t nframes, void *arg);
359
369 typedef void (*JackPortRegistrationCallback)(jack_port_id_t port, int register, void *arg);
370
380 typedef void (*JackClientRegistrationCallback)(const char* name, int register, void *arg);
381
392 typedef void (*JackPortConnectCallback)(jack_port_id_t a, jack_port_id_t b, int connect, void* arg);
393
401 typedef void (*JackFreewheelCallback)(int starting, void *arg);
402
403 typedef void *(*JackThreadCallback)(void* arg);
404
416 typedef void (*JackShutdownCallback)(void *arg);
417
431 typedef void (*JackInfoShutdownCallback)(jack_status_t code, const char* reason, void *arg);
432
437 #define JACK_DEFAULT_AUDIO_TYPE "32 bit float mono audio"
438 #define JACK_DEFAULT_MIDI_TYPE "8 bit raw midi"
439
445 typedef float jack_default_audio_sample_t;
446
453 enum JackPortFlags {
454
459 JackPortIsInput = 0x1,
460
465 JackPortIsOutput = 0x2,
466
471 JackPortIsPhysical = 0x4,
472
486 JackPortCanMonitor = 0x8,
487
502 JackPortIsTerminal = 0x10
503 };
504
505
506 #endif /* __jack_types_h__ */
507