00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef __jack_transport_aux_h__
00023 #define __jack_transport_aux_h__
00024
00025 #ifdef __cplusplus
00026 extern "C"
00027 {
00028 #endif
00029
00030 #include "types.h"
00031
00035 typedef enum {
00036
00037
00038 JackTransportStopped = 0,
00039 JackTransportRolling = 1,
00040 JackTransportLooping = 2,
00041 JackTransportStarting = 3,
00042 JackTransportSynching = 4
00044 } jack_transport_state_t;
00045
00046 typedef uint64_t jack_unique_t;
00051 typedef enum {
00052
00053 JackPositionBBT = 0x10,
00054 JackPositionTimecode = 0x20
00056 } jack_position_bits_t;
00057
00059 #define JACK_POSITION_MASK (JackPositionBBT|JackPositionTimecode)
00060 #define EXTENDED_TIME_INFO
00061
00065 typedef struct {
00066
00067
00068 jack_unique_t unique_1;
00069 jack_time_t usecs;
00070 jack_nframes_t frame_rate;
00071 jack_nframes_t frame;
00073 jack_position_bits_t valid;
00075
00076 int32_t bar;
00077 int32_t beat;
00078 int32_t tick;
00079 double bar_start_tick;
00080
00081 float beats_per_bar;
00082 float beat_type;
00083 double ticks_per_beat;
00084 double beats_per_minute;
00085
00086
00087 double frame_time;
00088 double next_time;
00091
00092
00093
00094 int32_t padding[10];
00095
00096
00097 jack_unique_t unique_2;
00099 }
00100 jack_position_t;
00101
00123 typedef int (*JackSyncCallback)(jack_transport_state_t state,
00124 jack_position_t *pos,
00125 void *arg);
00126
00127
00157 typedef void (*JackTimebaseCallback)(jack_transport_state_t state,
00158 jack_nframes_t nframes,
00159 jack_position_t *pos,
00160 int new_pos,
00161 void *arg);
00162
00163
00164
00165
00166
00167
00173 typedef enum {
00174
00175 JackTransportState = 0x1,
00176 JackTransportPosition = 0x2,
00177 JackTransportLoop = 0x4,
00178 JackTransportSMPTE = 0x8,
00179 JackTransportBBT = 0x10
00181 } jack_transport_bits_t;
00182
00189 typedef struct {
00190
00191
00192
00193 jack_nframes_t frame_rate;
00194 jack_time_t usecs;
00196 jack_transport_bits_t valid;
00197 jack_transport_state_t transport_state;
00198 jack_nframes_t frame;
00199 jack_nframes_t loop_start;
00200 jack_nframes_t loop_end;
00201
00202 long smpte_offset;
00203 float smpte_frame_rate;
00205 int bar;
00206 int beat;
00207 int tick;
00208 double bar_start_tick;
00209
00210 float beats_per_bar;
00211 float beat_type;
00212 double ticks_per_beat;
00213 double beats_per_minute;
00214
00215 }
00216 jack_transport_info_t;
00217
00218 #ifdef __cplusplus
00219 }
00220 #endif
00221
00222 #endif