From ce588b3af5db56e4c0f22facc8f1bb25e0be7d5d Mon Sep 17 00:00:00 2001 From: falkTX Date: Wed, 14 Jul 2021 21:00:43 +0100 Subject: [PATCH] Add jack_position_t::tick_double, and flags around it --- transport.h | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/transport.h b/transport.h index a631716..ab93939 100644 --- a/transport.h +++ b/transport.h @@ -47,18 +47,21 @@ typedef uint64_t jack_unique_t; /**< Unique ID (opaque) */ * Optional struct jack_position_t fields. */ typedef enum { - - JackPositionBBT = 0x10, /**< Bar, Beat, Tick */ - JackPositionTimecode = 0x20, /**< External timecode */ - JackBBTFrameOffset = 0x40, /**< Frame offset of BBT information */ - JackAudioVideoRatio = 0x80, /**< audio frames per video frame */ - JackVideoFrameOffset = 0x100 /**< frame offset of first video frame */ + JackPositionBBT = 0x10, /**< Bar, Beat, Tick */ + JackPositionTimecode = 0x20, /**< External timecode */ + JackBBTFrameOffset = 0x40, /**< Frame offset of BBT information */ + JackAudioVideoRatio = 0x80, /**< audio frames per video frame */ + JackVideoFrameOffset = 0x100, /**< frame offset of first video frame */ + JackTickDouble = 0x200, /**< double-resolution tick */ } jack_position_bits_t; /** all valid position bits */ #define JACK_POSITION_MASK (JackPositionBBT|JackPositionTimecode|JackBBTFrameOffset|JackAudioVideoRatio|JackVideoFrameOffset) #define EXTENDED_TIME_INFO +/** transport tick_double member is available for use */ +#define JACK_TICK_DOUBLE + /** * Struct for transport position information. */ @@ -178,12 +181,21 @@ typedef struct { no video frame within this cycle. */ /*}@*/ + /*@{*/ + /* JACK extra transport fields */ + double tick_double; /**< current tick-within-beat in double resolution. + Should be assumed zero if JackTickDouble is not set. + Since older versions of JACK do not expose this variable, + the macro JACK_TICK_DOUBLE is provided, + which can be used as build-time detection. */ + /*}@*/ + /*@{*/ /** @name Other fields */ /* For binary compatibility, new fields should be allocated from * this padding area with new valid bits controlling access, so * the existing structure size and offsets are preserved. */ - int32_t padding[7]; + int32_t padding[5]; /*}@*/ /* When (unique_1 == unique_2) the contents are consistent. */