Skip to content

Add jack_position_t::tick_double, and flags around it #770

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 5, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 18 additions & 6 deletions common/jack/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -538,18 +538,22 @@ 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;

/** all valid position bits */
#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 {

Expand Down Expand Up @@ -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 */
Expand Down