Move WallClock transport master to ifdef since it breaks session compatibilty

The new enum causes sessions made with this version to "crash" older
versions.

ifdef out Wallclock TM and add an enum hack_table entry. Versions compiled
this way will be compatiable when Wallclock gets turned back on at a later
time.
This commit is contained in:
Todd Naugle committed 2026-10-15 16:58:37 -05:00
1 parent b5262cc6ff
commit 47b1a5b222
10 files changed
+30 -1

No files matched your search

+4
View File
@@ -1442,7 +1442,11 @@ ARDOUR_UI::update_timecode_format ()
std::shared_ptr<TimecodeTransportMaster> tcmaster;
std::shared_ptr<TransportMaster> tm = TransportMasterManager::instance().current();
#ifdef WALLCLOCK_TM
if (tm && (tm->type() == LTC || tm->type() == MTC || tm->type() == WallClock) && (tcmaster = std::dynamic_pointer_cast<TimecodeTransportMaster>(tm)) != 0 && tm->locked()) {
#else
if (tm && (tm->type() == LTC || tm->type() == MTC) && (tcmaster = std::dynamic_pointer_cast<TimecodeTransportMaster>(tm)) != 0 && tm->locked()) {
#endif
matching = (tcmaster->apparent_timecode_format() == _session->config.get_timecode_format());
} else {
matching = true;
+2
View File
@@ -1030,10 +1030,12 @@ AudioClock::set_slave_info ()
switch (tm->type()) {
case Engine:
#ifdef WALLCLOCK_TM
case WallClock:
_left_btn.set_text (tm->name(), true);
_right_btn.set_text ("", true);
break;
#endif
case MIDIClock:
if (tm) {
_left_btn.set_text (tm->display_name(), true);
+2
View File
@@ -348,8 +348,10 @@ public:
return TRS_MTC;
case LTC:
return TRS_LTC;
#ifdef WALLCLOCK_TM
case WallClock:
return TRS_WallClock;
#endif
case MIDIClock:
break;
}
+4
View File
@@ -664,7 +664,9 @@ enum SyncSource {
MTC,
MIDIClock,
LTC,
#ifdef WALLCLOCK_TM
WallClock,
#endif
};
enum TransportRequestSource {
@@ -674,7 +676,9 @@ enum TransportRequestSource {
TRS_LTC,
TRS_MMC,
TRS_UI,
#ifdef WALLCLOCK_TM
TRS_WallClock,
#endif
};
enum TransportRequestType {
+5
View File
@@ -467,7 +467,12 @@ setup_enum_writer ()
REGISTER_ENUM (Engine);
REGISTER_ENUM (MIDIClock);
REGISTER_ENUM (LTC);
#ifdef WALLCLOCK_TM
REGISTER_ENUM (WallClock);
#else
// Improve backward compatibility when wallclock gets turned on
enum_writer.add_to_hack_table ("WallClock", "Engine");
#endif
REGISTER (_SyncSource);
REGISTER_ENUM (TR_StartStop);
+2
View File
@@ -1046,7 +1046,9 @@ ARDOUR::get_available_sync_options ()
ret.push_back (MTC);
ret.push_back (MIDIClock);
ret.push_back (LTC);
#ifdef WALLCLOCK_TM
ret.push_back (WallClock);
#endif
return ret;
}
+2
View File
@@ -3012,7 +3012,9 @@ LuaBindings::common (lua_State* L)
.addConst ("MTC", ARDOUR::SyncSource(MTC))
.addConst ("MIDIClock", ARDOUR::SyncSource(MIDIClock))
.addConst ("LTC", ARDOUR::SyncSource(LTC))
#ifdef WALLCLOCK_TM
.addConst ("WallClock", ARDOUR::SyncSource(WallClock))
#endif
.endNamespace ()
.beginNamespace ("TracksAutoNamingRule")
+4
View File
@@ -387,9 +387,11 @@ TransportMaster::factory (SyncSource type, std::string const& name, bool removea
case Engine:
tm.reset (new Engine_TransportMaster (*AudioEngine::instance()));
break;
#ifdef WALLCLOCK_TM
case WallClock:
tm.reset (new WallClock_TransportMaster (name));
break;
#endif
default:
break;
}
@@ -451,6 +453,7 @@ TransportMaster::display_name (bool sh) const
return name();
}
#ifdef WALLCLOCK_TM
case WallClock:
if (sh) {
if (name().length() <= 4) {
@@ -460,6 +463,7 @@ TransportMaster::display_name (bool sh) const
} else {
return name();
}
#endif
}
/* GRRRR .... stupid, stupid gcc - you can't get here from there, all enum values are handled */
+2
View File
@@ -81,7 +81,9 @@ TransportMasterManager::set_default_configuration ()
_current_master.reset ();
add_locked (TransportMaster::factory (Engine, X_("JACK Transport"), false));
#ifdef WALLCLOCK_TM
add_locked (TransportMaster::factory (WallClock, X_("Wall Clock"), false));
#endif
add_locked (TransportMaster::factory (MTC, X_("MTC"), false));
add_locked (TransportMaster::factory (LTC, X_("LTC"), false));
add_locked (TransportMaster::factory (MIDIClock, X_("MIDI Clock"), false));
+3 -1
View File
@@ -283,7 +283,6 @@ libardour_sources = [
'velocity_control.cc',
'video_tools_paths.cc',
'vumeterdsp.cc',
'wallclock_transport.cc',
'worker.cc',
'zeroconf.cc'
]
@@ -450,6 +449,9 @@ def build(bld):
if bld.is_defined('HAVE_SUIL'):
obj.use += [ 'libsuil' ]
if bld.is_defined('WALLCLOCK_TM'):
obj.source += [ 'wallclock_transport.cc']
if bld.is_defined('WINDOWS_VST_SUPPORT'):
obj.source += [ 'windows_vst_plugin.cc']
obj.defines += [ 'WINDOWS_VST_SUPPORT' ]