00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef __jack_types_h__
00022 #define __jack_types_h__
00023
00024 #include <jack/systemdeps.h>
00025
00026
00027 typedef int32_t jack_shmsize_t;
00028
00032 typedef uint32_t jack_nframes_t;
00033
00037 #define JACK_MAX_FRAMES (4294967295U)
00038
00043 typedef uint64_t jack_time_t;
00044
00049 #define JACK_LOAD_INIT_LIMIT 1024
00050
00056 typedef uint64_t jack_intclient_t;
00057
00062 typedef struct _jack_port jack_port_t;
00063
00068 typedef struct _jack_client jack_client_t;
00069
00074 typedef uint32_t jack_port_id_t;
00075
00076 typedef uint32_t jack_port_type_id_t;
00077
00090 typedef int (*JackProcessCallback)(jack_nframes_t nframes, void *arg);
00091
00099 typedef void *(*JackThreadCallback)(void* arg);
00100
00113 typedef void (*JackThreadInitCallback)(void *arg);
00114
00123 typedef int (*JackGraphOrderCallback)(void *arg);
00124
00135 typedef int (*JackXRunCallback)(void *arg);
00136
00151 typedef int (*JackBufferSizeCallback)(jack_nframes_t nframes, void *arg);
00152
00162 typedef int (*JackSampleRateCallback)(jack_nframes_t nframes, void *arg);
00163
00170 typedef void (*JackPortRegistrationCallback)(jack_port_id_t port, int, void *arg);
00171
00181 typedef void (*JackClientRegistrationCallback)(const char* name, int val, void *arg);
00182
00193 typedef void (*JackPortConnectCallback)(jack_port_id_t a, jack_port_id_t b, int connect, void* arg);
00194
00205 typedef int (*JackPortRenameCallback)(jack_port_id_t port, const char* new_name, void *arg);
00206
00214 typedef void (*JackFreewheelCallback)(int starting, void *arg);
00215
00227 typedef void (*JackShutdownCallback)(void *arg);
00228
00233 #define JACK_DEFAULT_AUDIO_TYPE "32 bit float mono audio"
00234 #define JACK_DEFAULT_MIDI_TYPE "8 bit raw midi"
00235
00241 typedef float jack_default_audio_sample_t;
00242
00249 enum JackPortFlags {
00250
00255 JackPortIsInput = 0x1,
00256
00261 JackPortIsOutput = 0x2,
00262
00267 JackPortIsPhysical = 0x4,
00268
00282 JackPortCanMonitor = 0x8,
00283
00298 JackPortIsTerminal = 0x10
00299 };
00300
00304 enum JackOptions {
00305
00309 JackNullOption = 0x00,
00310
00317 JackNoStartServer = 0x01,
00318
00323 JackUseExactName = 0x02,
00324
00328 JackServerName = 0x04,
00329
00334 JackLoadName = 0x08,
00335
00340 JackLoadInit = 0x10
00341 };
00342
00344 #define JackOpenOptions (JackServerName|JackNoStartServer|JackUseExactName)
00345
00347 #define JackLoadOptions (JackLoadInit|JackLoadName|JackUseExactName)
00348
00353 typedef enum JackOptions jack_options_t;
00354
00358 enum JackStatus {
00359
00363 JackFailure = 0x01,
00364
00368 JackInvalidOption = 0x02,
00369
00379 JackNameNotUnique = 0x04,
00380
00387 JackServerStarted = 0x08,
00388
00392 JackServerFailed = 0x10,
00393
00397 JackServerError = 0x20,
00398
00402 JackNoSuchClient = 0x40,
00403
00407 JackLoadFailure = 0x80,
00408
00412 JackInitFailure = 0x100,
00413
00417 JackShmFailure = 0x200,
00418
00422 JackVersionError = 0x400
00423 };
00424
00429 typedef enum JackStatus jack_status_t;
00430
00434 typedef enum {
00435
00436
00437 JackTransportStopped = 0,
00438 JackTransportRolling = 1,
00439 JackTransportLooping = 2,
00440 JackTransportStarting = 3,
00441 JackTransportNetStarting = 4,
00443 } jack_transport_state_t;
00444
00445 typedef uint64_t jack_unique_t;
00450 typedef enum {
00451
00452 JackPositionBBT = 0x10,
00453 JackPositionTimecode = 0x20,
00454 JackBBTFrameOffset = 0x40,
00455 JackAudioVideoRatio = 0x80,
00456 JackVideoFrameOffset = 0x100
00458 } jack_position_bits_t;
00459
00461 #define JACK_POSITION_MASK (JackPositionBBT|JackPositionTimecode)
00462 #define EXTENDED_TIME_INFO
00463
00464 typedef struct {
00465
00466
00467 jack_unique_t unique_1;
00468 jack_time_t usecs;
00469 jack_nframes_t frame_rate;
00470 jack_nframes_t frame;
00472 jack_position_bits_t valid;
00474
00475 int32_t bar;
00476 int32_t beat;
00477 int32_t tick;
00478 double bar_start_tick;
00479
00480 float beats_per_bar;
00481 float beat_type;
00482 double ticks_per_beat;
00483 double beats_per_minute;
00484
00485
00486 double frame_time;
00487 double next_time;
00490
00491 jack_nframes_t bbt_offset;
00506
00507
00508 float audio_frames_per_video_frame;
00515 jack_nframes_t video_offset;
00522
00523
00524
00525 int32_t padding[7];
00526
00527
00528 jack_unique_t unique_2;
00530 } jack_position_t;
00531
00553 typedef int (*JackSyncCallback)(jack_transport_state_t state,
00554 jack_position_t *pos,
00555 void *arg);
00556
00557
00587 typedef void (*JackTimebaseCallback)(jack_transport_state_t state,
00588 jack_nframes_t nframes,
00589 jack_position_t *pos,
00590 int new_pos,
00591 void *arg);
00592
00593
00594
00595
00596
00597
00603 typedef enum {
00604
00605 JackTransportState = 0x1,
00606 JackTransportPosition = 0x2,
00607 JackTransportLoop = 0x4,
00608 JackTransportSMPTE = 0x8,
00609 JackTransportBBT = 0x10
00611 } jack_transport_bits_t;
00612
00619 typedef struct {
00620
00621
00622
00623 jack_nframes_t frame_rate;
00624 jack_time_t usecs;
00626 jack_transport_bits_t valid;
00627 jack_transport_state_t transport_state;
00628 jack_nframes_t frame;
00629 jack_nframes_t loop_start;
00630 jack_nframes_t loop_end;
00631
00632 long smpte_offset;
00633 float smpte_frame_rate;
00635 int bar;
00636 int beat;
00637 int tick;
00638 double bar_start_tick;
00639
00640 float beats_per_bar;
00641 float beat_type;
00642 double ticks_per_beat;
00643 double beats_per_minute;
00644
00645 } jack_transport_info_t;
00646
00647 #endif