Crudebyte Logo
types.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2001-2013
3 
4  Developers:
5 
6  Paul Davis
7  Jack O'Quin
8  Steve Harris
9  Rui Nuno Capela
10  Devin Anderson
11  Kai Vehmanen
12  Ian Esten
13  Dmitry Baikov
14  Torben Hohn
15  Rohan Drape
16  Stephane Letz
17  Christian Schoenebeck
18 
19  This program is free software; you can redistribute it and/or modify
20  it under the terms of the GNU Lesser General Public License as published by
21  the Free Software Foundation; either version 2.1 of the License, or
22  (at your option) any later version.
23 
24  This program is distributed in the hope that it will be useful,
25  but WITHOUT ANY WARRANTY; without even the implied warranty of
26  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27  GNU Lesser General Public License for more details.
28 
29  You should have received a copy of the GNU Lesser General Public License
30  along with this program; if not, write to the Free Software
31  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
32 
33  You are permitted to statically link against a binary version of
34  the JACK library obtained from
35 
36  http://jackaudio.org/downloads/JackiOS-SDK.zip
37 
38  and distribute the resulting application without complying with section 6
39  (requiring recipients of your application to be able to relink against
40  modified versions of libjack).
41 
42  This permission is granted if and ONLY if the resulting application binary
43  issue is intended for execution in any one of the following environments:
44 
45  * Apple Inc. iOS
46 
47  Additional environments may be added to this list in the future.
48  All other terms of the LGPL continue to apply.
49 
50 */
51 
52 #ifndef __jack_types_h__
53 #define __jack_types_h__
54 
55 #include <jack/systemdeps.h>
56 
65 typedef int32_t jack_shmsize_t;
66 
70 typedef uint32_t jack_nframes_t;
71 
75 #define JACK_MAX_FRAMES (4294967295U) /* This should be UINT32_MAX, but C++ has a problem with that. */
76 
81 typedef uint64_t jack_time_t;
82 
87 #define JACK_LOAD_INIT_LIMIT 1024
88 
94 typedef uint64_t jack_intclient_t;
95 
100 typedef struct _jack_port jack_port_t;
101 
106 typedef struct _jack_client jack_client_t;
107 
112 typedef uint32_t jack_port_id_t;
113 
114 typedef uint32_t jack_port_type_id_t;
115 
120 
125 
133 
139 
144 
149  JackLoadName = 0x08,
150 
155  JackLoadInit = 0x10,
156 
161 
167 };
168 
170 #define JackOpenOptions (JackSessionID | JackServerName | JackNoStartServer | JackUseExactName | JackNoBackground)
171 
173 #define JackLoadOptions (JackLoadInit | JackLoadName | JackUseExactName)
174 
180 
185 
190  JackFailure = 0x01,
191 
196 
207 
215 
220 
225 
230 
235 
240 
244  JackShmFailure = 0x200,
245 
250 
255 
263 
268 
273 };
274 
280 
285 
292 
299 
300 };
301 
306 
307 
315 
320 
325 
330 
331 };
332 
337 
342 typedef enum JackRegisterFlags {
351 
368 
370 
380 typedef void (*JackLatencyCallback)(jack_latency_callback_mode_t mode, void *arg);
381 
385 PRE_PACKED_STRUCTURE
387 {
396 } POST_PACKED_STRUCTURE;
397 
399 
412 typedef int (*JackProcessCallback)(jack_nframes_t nframes, void *arg);
413 
421 typedef void *(*JackThreadCallback)(void* arg);
422 
435 typedef void (*JackThreadInitCallback)(void *arg);
436 
445 typedef int (*JackGraphOrderCallback)(void *arg);
446 
457 typedef int (*JackXRunCallback)(void *arg);
458 
473 typedef int (*JackBufferSizeCallback)(jack_nframes_t nframes, void *arg);
474 
484 typedef int (*JackSampleRateCallback)(jack_nframes_t nframes, void *arg);
485 
495 typedef void (*JackPortRegistrationCallback)(jack_port_id_t port, int register, void *arg);
496 
506 typedef void (*JackClientRegistrationCallback)(const char* name, int register, void *arg);
507 
518 typedef void (*JackPortConnectCallback)(jack_port_id_t a, jack_port_id_t b, int connect, void* arg);
519 
530 typedef int (*JackPortRenameCallback)(jack_port_id_t port, const char* old_name, const char* new_name, void *arg);
531 
539 typedef void (*JackFreewheelCallback)(int starting, void *arg);
540 
562 typedef void (*JackShutdownCallback)(void *arg);
563 
586 typedef void (*JackInfoShutdownCallback)(jack_status_t code, const char* reason, void *arg);
587 
592 #define JACK_DEFAULT_AUDIO_TYPE "32 bit float mono audio"
593 
598 #define JACK_DEFAULT_MIDI_TYPE "8 bit raw midi"
599 
606 
614 
620 
626 
632 
647 
663 
664 };
665 
669 typedef enum {
670 
671  /* the order matters for binary compatibility */
679 
680 typedef uint64_t jack_unique_t;
685 typedef enum {
686 
694 
696 #define JACK_POSITION_MASK (JackPositionBBT|JackPositionTimecode)
697 #define EXTENDED_TIME_INFO
698 
699 PRE_PACKED_STRUCTURE
701 
702  /* these four cannot be set from clients: the server sets them */
710  /* JackPositionBBT fields: */
711  int32_t bar;
712  int32_t beat;
713  int32_t tick;
714  double bar_start_tick;
715 
717  float beat_type;
718  double ticks_per_beat;
719  double beats_per_minute;
720 
721  /* JackPositionTimecode fields: (EXPERIMENTAL: could change) */
722  double frame_time;
723  double next_time;
726  /* JackBBTFrameOffset fields: */
742  /* JACK video positional data (experimental) */
743 
758  /* For binary compatibility, new fields should be allocated from
759  * this padding area with new valid bits controlling access, so
760  * the existing structure size and offsets are preserved. */
761  int32_t padding[7];
762 
763  /* When (unique_1 == unique_2) the contents are consistent. */
766 } POST_PACKED_STRUCTURE;
767 
768 typedef struct _jack_position jack_position_t;
769 
792  jack_position_t *pos,
793  void *arg);
794 
795 
826  jack_nframes_t nframes,
827  jack_position_t *pos,
828  int new_pos,
829  void *arg);
830 
831 /*********************************************************************
832  * The following interfaces are DEPRECATED. They are only provided
833  * for compatibility with the earlier JACK transport implementation.
834  *********************************************************************/
835 
841 typedef enum {
842 
850 
857 typedef struct {
858 
859  /* these two cannot be set from clients: the server sets them */
860 
865  jack_transport_state_t transport_state;
867  jack_nframes_t loop_start;
868  jack_nframes_t loop_end;
869 
873  int bar;
874  int beat;
875  int tick;
876  double bar_start_tick;
877 
878  float beats_per_bar;
879  float beat_type;
880  double ticks_per_beat;
881  double beats_per_minute;
882 
884 
885 
886 #endif /* __jack_types_h__ */
DE • EN
Copyright © MMXIII Crudebyte. All rights reserved.

twitter