fix up enum mess caused by switching from JACK to Engine as the name for jack-related...
authorPaul Davis <paul@linuxaudiosystems.com>
Wed, 25 Sep 2013 22:24:32 +0000 (18:24 -0400)
committerPaul Davis <paul@linuxaudiosystems.com>
Wed, 25 Sep 2013 22:24:32 +0000 (18:24 -0400)
This will allow older versions of Ardour to continue to startup when the user sync preference is "JACK",
because the string used by enum_2_string() will still be "JACK".

Versions of ardour3 from git after the enum change until this commit will leave ardour.rc unloaded by old
versions of Ardour ***if*** the user sync choice was "JACK".

libs/ardour/ardour/types.h
libs/ardour/enums.cc

index ca3f1acc199155fe123495e6be52c25d235c9816..526a71c58b85c5dec29a22acb56b8a8b125ac0c1 100644 (file)
@@ -489,8 +489,12 @@ namespace ARDOUR {
        };
 
        enum SyncSource {
-               Engine = 0,
+               /* These are "synonyms". It is important for JACK to be first
+                  both here and in enums.cc, so that the string "JACK" is
+                  correctly recognized in older session and preference files.
+               */
                JACK = 0,
+               Engine = 0,
                MTC,
                MIDIClock,
                LTC
index 3898a0e88193ec44744b77fd3953658907c3aef2..2a38cd2c8a88bf3ce507df209de936a483e0ed08 100644 (file)
@@ -335,8 +335,8 @@ setup_enum_writer ()
        REGISTER (_PluginType);
 
        REGISTER_ENUM (MTC);
-       REGISTER_ENUM (Engine);
        REGISTER_ENUM (JACK);
+       REGISTER_ENUM (Engine);
        REGISTER_ENUM (MIDIClock);
        REGISTER_ENUM (LTC);
        REGISTER (_SyncSource);