summaryrefslogtreecommitdiff
path: root/common/jack
diff options
context:
space:
mode:
authorFilipe Coelho <falktx@falktx.com>2021-07-05 20:25:09 +0100
committerGitHub <noreply@github.com>2021-07-05 20:25:09 +0100
commit814629b5662a730a023e2951c38dafc73f8238e5 (patch)
tree9324f16335a4e817a7f8abefc03ca2ca94357b02 /common/jack
parentb5ba873189c8f45c19a36a5179d1b0a0815a65a7 (diff)
downloadjack2-814629b5662a730a023e2951c38dafc73f8238e5.tar.gz
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 <falktx@falktx.com> * s/precision/resolution/ Signed-off-by: falkTX <falktx@falktx.com>
Diffstat (limited to 'common/jack')
-rw-r--r--common/jack/types.h24
1 files changed, 18 insertions, 6 deletions
diff --git a/common/jack/types.h b/common/jack/types.h
index b62af964..1a1ea069 100644
--- a/common/jack/types.h
+++ b/common/jack/types.h
@@ -538,11 +538,12 @@ typedef uint64_t jack_unique_t; /**< Unique ID (opaque) */
*/
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;
@@ -550,6 +551,9 @@ typedef enum {
#define JACK_POSITION_MASK (JackPositionBBT|JackPositionTimecode)
#define EXTENDED_TIME_INFO
+/** transport tick_double member is available for use */
+#define JACK_TICK_DOUBLE
+
PRE_PACKED_STRUCTURE
struct _jack_position {
@@ -609,10 +613,18 @@ struct _jack_position {
set, but the value is zero, there is
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. */
+
/* 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. */
jack_unique_t unique_2; /**< unique ID */