diff options
Diffstat (limited to 'libs/ardour')
-rw-r--r-- | libs/ardour/ardour/source.h | 3 | ||||
-rw-r--r-- | libs/ardour/ardour/types.h | 2 | ||||
-rw-r--r-- | libs/ardour/audio_track.cc | 5 | ||||
-rw-r--r-- | libs/ardour/enums.cc | 8 | ||||
-rw-r--r-- | libs/ardour/source.cc | 4 |
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 = ""; } |