Signed-off-by: falkTX <falktx@falktx.com>tags/v2.3.1
@@ -262,14 +262,15 @@ void EngineInternalTime::fillJackTimeInfo(jack_position_t* const pos, const uint | |||||
fillEngineTimeInfo(newFrames); | fillEngineTimeInfo(newFrames); | ||||
pos->valid = JackPositionBBT; | |||||
pos->bar = timeInfo.bbt.bar; | |||||
pos->beat = timeInfo.bbt.beat; | |||||
pos->tick = static_cast<int32_t>(timeInfo.bbt.tick + 0.5); | |||||
pos->bar_start_tick = timeInfo.bbt.barStartTick; | |||||
pos->beats_per_bar = timeInfo.bbt.beatsPerBar; | |||||
pos->beat_type = timeInfo.bbt.beatType; | |||||
pos->ticks_per_beat = kTicksPerBeat; | |||||
pos->valid = static_cast<jack_position_bits_t>(JackPositionBBT|JackTickDouble); | |||||
pos->bar = timeInfo.bbt.bar; | |||||
pos->beat = timeInfo.bbt.beat; | |||||
pos->tick = static_cast<int32_t>(timeInfo.bbt.tick + 0.5); | |||||
pos->tick_double = timeInfo.bbt.tick; | |||||
pos->bar_start_tick = timeInfo.bbt.barStartTick; | |||||
pos->beats_per_bar = timeInfo.bbt.beatsPerBar; | |||||
pos->beat_type = timeInfo.bbt.beatType; | |||||
pos->ticks_per_beat = kTicksPerBeat; | |||||
pos->beats_per_minute = beatsPerMinute; | pos->beats_per_minute = beatsPerMinute; | ||||
} | } | ||||
@@ -1918,7 +1918,12 @@ public: | |||||
timeInfo.bbt.valid = true; | timeInfo.bbt.valid = true; | ||||
timeInfo.bbt.bar = jpos.bar; | timeInfo.bbt.bar = jpos.bar; | ||||
timeInfo.bbt.beat = jpos.beat; | timeInfo.bbt.beat = jpos.beat; | ||||
timeInfo.bbt.tick = jpos.tick; | |||||
#ifdef JACK_TICK_DOUBLE | |||||
if (jpos.valid & JackTickDouble) | |||||
timeInfo.bbt.tick = jpos.tick_double; | |||||
else | |||||
#endif | |||||
timeInfo.bbt.tick = jpos.tick; | |||||
timeInfo.bbt.barStartTick = jpos.bar_start_tick; | timeInfo.bbt.barStartTick = jpos.bar_start_tick; | ||||
timeInfo.bbt.beatsPerBar = jpos.beats_per_bar; | timeInfo.bbt.beatsPerBar = jpos.beats_per_bar; | ||||
timeInfo.bbt.beatType = jpos.beat_type; | timeInfo.bbt.beatType = jpos.beat_type; | ||||
@@ -2922,7 +2927,12 @@ protected: | |||||
timeInfo.bbt.valid = true; | timeInfo.bbt.valid = true; | ||||
timeInfo.bbt.bar = jpos.bar; | timeInfo.bbt.bar = jpos.bar; | ||||
timeInfo.bbt.beat = jpos.beat; | timeInfo.bbt.beat = jpos.beat; | ||||
timeInfo.bbt.tick = jpos.tick; | |||||
#ifdef JACK_TICK_DOUBLE | |||||
if (jpos.valid & JackTickDouble) | |||||
timeInfo.bbt.tick = jpos.tick_double; | |||||
else | |||||
#endif | |||||
timeInfo.bbt.tick = jpos.tick; | |||||
timeInfo.bbt.barStartTick = jpos.bar_start_tick; | timeInfo.bbt.barStartTick = jpos.bar_start_tick; | ||||
timeInfo.bbt.beatsPerBar = jpos.beats_per_bar; | timeInfo.bbt.beatsPerBar = jpos.beats_per_bar; | ||||
timeInfo.bbt.beatType = jpos.beat_type; | timeInfo.bbt.beatType = jpos.beat_type; | ||||
@@ -98,6 +98,8 @@ | |||||
#define JACK_UUID_SIZE 36 | #define JACK_UUID_SIZE 36 | ||||
#define JACK_UUID_STRING_SIZE (JACK_UUID_SIZE+1) /* includes trailing null */ | #define JACK_UUID_STRING_SIZE (JACK_UUID_SIZE+1) /* includes trailing null */ | ||||
#define JACK_TICK_DOUBLE | |||||
extern "C" { | extern "C" { | ||||
enum JackOptions { | enum JackOptions { | ||||
@@ -152,7 +154,8 @@ enum JackPositionBits { | |||||
JackPositionTimecode = 0x020, | JackPositionTimecode = 0x020, | ||||
JackBBTFrameOffset = 0x040, | JackBBTFrameOffset = 0x040, | ||||
JackAudioVideoRatio = 0x080, | JackAudioVideoRatio = 0x080, | ||||
JackVideoFrameOffset = 0x100 | |||||
JackVideoFrameOffset = 0x100, | |||||
JackTickDouble = 0x200 | |||||
}; | }; | ||||
enum JackSessionEventType { | enum JackSessionEventType { | ||||
@@ -222,7 +225,8 @@ struct _jack_position { | |||||
jack_nframes_t bbt_offset; | jack_nframes_t bbt_offset; | ||||
float audio_frames_per_video_frame; | float audio_frames_per_video_frame; | ||||
jack_nframes_t video_offset; | jack_nframes_t video_offset; | ||||
int32_t padding[7]; | |||||
double tick_double; | |||||
int32_t padding[5]; | |||||
jack_unique_t unique_2; | jack_unique_t unique_2; | ||||
} POST_PACKED_STRUCTURE; | } POST_PACKED_STRUCTURE; | ||||
@@ -822,11 +822,12 @@ bool CarlaJackAppClient::handleRtData() | |||||
if (bridgeTimeInfo.validFlags & kPluginBridgeTimeInfoValidBBT) | if (bridgeTimeInfo.validFlags & kPluginBridgeTimeInfoValidBBT) | ||||
{ | { | ||||
fServer.position.valid = JackPositionBBT; | |||||
fServer.position.valid = static_cast<jack_position_bits_t>(JackPositionBBT|JackTickDouble); | |||||
fServer.position.bar = bridgeTimeInfo.bar; | fServer.position.bar = bridgeTimeInfo.bar; | ||||
fServer.position.beat = bridgeTimeInfo.beat; | fServer.position.beat = bridgeTimeInfo.beat; | ||||
fServer.position.tick = static_cast<int32_t>(bridgeTimeInfo.tick + 0.5); | fServer.position.tick = static_cast<int32_t>(bridgeTimeInfo.tick + 0.5); | ||||
fServer.position.tick_double = bridgeTimeInfo.tick; | |||||
fServer.position.beats_per_bar = bridgeTimeInfo.beatsPerBar; | fServer.position.beats_per_bar = bridgeTimeInfo.beatsPerBar; | ||||
fServer.position.beat_type = bridgeTimeInfo.beatType; | fServer.position.beat_type = bridgeTimeInfo.beatType; | ||||