summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2020-02-26 21:20:25 -0700
committerPaul Davis <paul@linuxaudiosystems.com>2020-03-17 16:31:49 -0600
commita30ee6950dfc37b54bd1e235387fc4415cfb2fd4 (patch)
tree7f05f8b2f6bbdc7a5581dfd726adc9d78a7db079 /libs
parenta4d7b45fe00996fd37a1af6d5be8c913a0b3bbf4 (diff)
restore being able to load a 5.12 session with a destructive track.
Not all is working right yet, however
Diffstat (limited to 'libs')
-rw-r--r--libs/ardour/ardour/source.h3
-rw-r--r--libs/ardour/ardour/types.h2
-rw-r--r--libs/ardour/audio_track.cc5
-rw-r--r--libs/ardour/enums.cc8
-rw-r--r--libs/ardour/source.cc4
5 files changed, 21 insertions, 1 deletions
diff --git a/libs/ardour/ardour/source.h b/libs/ardour/ardour/source.h
index e8dadf57bd..6b09a4d51d 100644
--- a/libs/ardour/ardour/source.h
+++ b/libs/ardour/ardour/source.h
@@ -53,7 +53,8 @@ public:
RemovableIfEmpty = 0x10,
RemoveAtDestroy = 0x20,
NoPeakFile = 0x40,
- /* 0x80 was Destructive */
+ /* No longer in use but kept to allow loading of older sessions */
+ Destructive = 0x80,
Empty = 0x100, /* used for MIDI only */
RF64_RIFF = 0x200,
Missing = 0x400, /* used for MIDI only */
diff --git a/libs/ardour/ardour/types.h b/libs/ardour/ardour/types.h
index 60943c1d28..12a0ee51e3 100644
--- a/libs/ardour/ardour/types.h
+++ b/libs/ardour/ardour/types.h
@@ -227,6 +227,8 @@ enum MeterType {
enum TrackMode {
Normal,
NonLayered,
+ /* No longer in use but kept to allow loading of older sessions */
+ Destructive,
};
enum NoteMode {
diff --git a/libs/ardour/audio_track.cc b/libs/ardour/audio_track.cc
index 20a540b0fa..74ecaeb6c3 100644
--- a/libs/ardour/audio_track.cc
+++ b/libs/ardour/audio_track.cc
@@ -143,6 +143,11 @@ AudioTrack::set_state (const XMLNode& node, int version)
_mode = Normal;
}
+ if (_mode == Destructive) {
+ /* XXX warn user */
+ _mode = Normal;
+ }
+
if (Track::set_state (node, version)) {
return -1;
}
diff --git a/libs/ardour/enums.cc b/libs/ardour/enums.cc
index 3b174cc7cb..3dc0d3122a 100644
--- a/libs/ardour/enums.cc
+++ b/libs/ardour/enums.cc
@@ -248,6 +248,10 @@ setup_enum_writer ()
REGISTER_ENUM (Normal);
REGISTER_ENUM (NonLayered);
+ /* No longer used but we leave this here so that enumwriter can parse
+ * strings containing "Destructive"
+ */
+ REGISTER_ENUM (Destructive);
REGISTER (_TrackMode);
REGISTER_ENUM (Sustained);
@@ -519,6 +523,10 @@ setup_enum_writer ()
REGISTER_CLASS_ENUM (Source, RemovableIfEmpty);
REGISTER_CLASS_ENUM (Source, RemoveAtDestroy);
REGISTER_CLASS_ENUM (Source, NoPeakFile);
+ /* No longer used but we leave this here so that enumwriter can parse
+ * strings containing "Destructive"
+ */
+ REGISTER_CLASS_ENUM (Source, Destructive);
REGISTER_CLASS_ENUM (Source, Empty);
REGISTER_BITS (_Source_Flag);
diff --git a/libs/ardour/source.cc b/libs/ardour/source.cc
index 58459e9e24..2bbfe843ac 100644
--- a/libs/ardour/source.cc
+++ b/libs/ardour/source.cc
@@ -167,6 +167,10 @@ Source::set_state (const XMLNode& node, int version)
_flags = Flag (0);
}
+ /* Destructive is no longer valid */
+
+ _flags = Flag (_flags & ~Destructive);
+
if (!node.get_property (X_("take-id"), _take_id)) {
_take_id = "";
}