Skip to content

Commit 814629b

Browse files
authored
Add jack_position_t::tick_double, and flags around it (#770)
* Add jack_position_t::tick_double, and flags around it Signed-off-by: falkTX <[email protected]> * s/precision/resolution/ Signed-off-by: falkTX <[email protected]>
1 parent b5ba873 commit 814629b

File tree

1 file changed

+18
-6
lines changed

1 file changed

+18
-6
lines changed

common/jack/types.h

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -538,18 +538,22 @@ typedef uint64_t jack_unique_t; /**< Unique ID (opaque) */
538538
*/
539539
typedef enum {
540540

541-
JackPositionBBT = 0x10, /**< Bar, Beat, Tick */
542-
JackPositionTimecode = 0x20, /**< External timecode */
543-
JackBBTFrameOffset = 0x40, /**< Frame offset of BBT information */
544-
JackAudioVideoRatio = 0x80, /**< audio frames per video frame */
545-
JackVideoFrameOffset = 0x100 /**< frame offset of first video frame */
541+
JackPositionBBT = 0x10, /**< Bar, Beat, Tick */
542+
JackPositionTimecode = 0x20, /**< External timecode */
543+
JackBBTFrameOffset = 0x40, /**< Frame offset of BBT information */
544+
JackAudioVideoRatio = 0x80, /**< audio frames per video frame */
545+
JackVideoFrameOffset = 0x100, /**< frame offset of first video frame */
546+
JackTickDouble = 0x200, /**< double-resolution tick */
546547

547548
} jack_position_bits_t;
548549

549550
/** all valid position bits */
550551
#define JACK_POSITION_MASK (JackPositionBBT|JackPositionTimecode)
551552
#define EXTENDED_TIME_INFO
552553

554+
/** transport tick_double member is available for use */
555+
#define JACK_TICK_DOUBLE
556+
553557
PRE_PACKED_STRUCTURE
554558
struct _jack_position {
555559

@@ -609,10 +613,18 @@ struct _jack_position {
609613
set, but the value is zero, there is
610614
no video frame within this cycle. */
611615

616+
/* JACK extra transport fields */
617+
618+
double tick_double; /**< current tick-within-beat in double resolution.
619+
Should be assumed zero if JackTickDouble is not set.
620+
Since older versions of JACK do not expose this variable,
621+
the macro JACK_TICK_DOUBLE is provided,
622+
which can be used as build-time detection. */
623+
612624
/* For binary compatibility, new fields should be allocated from
613625
* this padding area with new valid bits controlling access, so
614626
* the existing structure size and offsets are preserved. */
615-
int32_t padding[7];
627+
int32_t padding[5];
616628

617629
/* When (unique_1 == unique_2) the contents are consistent. */
618630
jack_unique_t unique_2; /**< unique ID */

0 commit comments

Comments
 (0)