diff --git a/libs/ardour/audio_diskstream.cc b/libs/ardour/audio_diskstream.cc index 84007e244a..1241e042bb 100644 --- a/libs/ardour/audio_diskstream.cc +++ b/libs/ardour/audio_diskstream.cc @@ -385,9 +385,8 @@ AudioDiskstream::use_destructive_playlist () ChannelList::iterator chan; boost::shared_ptr c = channels.reader(); - (*chan)->write_sources.clear (); - for (n = 0, chan = c->begin(); chan != c->end(); ++chan, ++n) { + (*chan)->write_sources.clear (); (*chan)->write_sources.push_back(boost::dynamic_pointer_cast(region->source (n))); assert (!(*chan)->write_sources.empty()); (*chan)->write_sources.front()->set_allow_remove_if_empty (false); @@ -2047,7 +2046,7 @@ AudioDiskstream::reset_write_sources (bool mark_write_complete, bool /*force*/) if (!destructive()) { - for (ChannelInfo::Sources::iterator s = (*chan)->write_sources.begin(); s != (*chan)->write_sources.end(); ++s) { + for (ChannelInfo::Sources::iterator s = (*chan)->write_sources.begin(); s != (*chan)->write_sources.end(); ++s) { if (mark_write_complete) { (*s)->mark_streaming_write_completed (); @@ -2060,7 +2059,7 @@ AudioDiskstream::reset_write_sources (bool mark_write_complete, bool /*force*/) } } - (*chan)->write_sources.clear (); + (*chan)->write_sources.clear (); use_new_write_source (n); @@ -2406,6 +2405,9 @@ AudioDiskstream::set_destructive (bool yn) bool AudioDiskstream::can_become_destructive (bool& requires_bounce) const { + // GZ: Waves Tracks does not support destructive Audio Tracks + return false; + if (!_playlist) { requires_bounce = false; return false; diff --git a/libs/ardour/audio_track.cc b/libs/ardour/audio_track.cc index a341c6eb0c..915b2ec09d 100644 --- a/libs/ardour/audio_track.cc +++ b/libs/ardour/audio_track.cc @@ -62,9 +62,7 @@ AudioTrack::create_diskstream () { AudioDiskstream::Flag dflags = AudioDiskstream::Flag (AudioDiskstream::Recordable); - if (_mode == Destructive) { - dflags = AudioDiskstream::Flag (dflags | AudioDiskstream::Destructive); - } else if (_mode == NonLayered){ + if (_mode == NonLayered){ dflags = AudioDiskstream::Flag(dflags | AudioDiskstream::NonLayered); } @@ -77,7 +75,8 @@ AudioTrack::set_diskstream (boost::shared_ptr ds) Track::set_diskstream (ds); _diskstream->set_track (this); - _diskstream->set_destructive (_mode == Destructive); + //GZ: Waves TracksLive does not support destructive Audio Tracks + _diskstream->set_destructive (false/*_mode == Destructive*/); _diskstream->set_non_layered (_mode == NonLayered); if (audio_diskstream()->deprecated_io_node) { @@ -106,7 +105,8 @@ AudioTrack::set_mode (TrackMode m) { if (m != _mode) { - if (_diskstream->set_destructive (m == Destructive)) { + //GZ: Waves TracksLive does not support destructive Audio Tracks + if (_diskstream->set_destructive (false/*m == Destructive*/)) { return -1; } @@ -130,7 +130,7 @@ AudioTrack::can_use_mode (TrackMode m, bool& bounce_required) case Destructive: default: - return _diskstream->can_become_destructive (bounce_required); + return false; //_diskstream->can_become_destructive (bounce_required); } } @@ -197,6 +197,11 @@ AudioTrack::set_state (const XMLNode& node, int version) _mode = Normal; } + // TracksLive does not support destructive Tracks + if (_mode == Destructive) { + _mode = Normal; + } + pending_state = const_cast (&node); if (_session.state_of_the_state() & Session::Loading) { diff --git a/libs/ardour/auditioner.cc b/libs/ardour/auditioner.cc index 4a1449a750..69cd936210 100644 --- a/libs/ardour/auditioner.cc +++ b/libs/ardour/auditioner.cc @@ -323,7 +323,8 @@ Auditioner::set_diskstream (boost::shared_ptr ds) Track::set_diskstream (ds); _diskstream->set_track (this); - _diskstream->set_destructive (_mode == Destructive); + //GZ: Waves TracksLive does not support destructive Audio Tracks + _diskstream->set_destructive (false/*_mode == Destructive*/); _diskstream->set_non_layered (_mode == NonLayered); _diskstream->set_record_enabled (false); _diskstream->request_input_monitoring (false); diff --git a/libs/ardour/diskstream.cc b/libs/ardour/diskstream.cc index 83ce7eb95b..7894692f35 100644 --- a/libs/ardour/diskstream.cc +++ b/libs/ardour/diskstream.cc @@ -493,6 +493,9 @@ Diskstream::set_state (const XMLNode& node, int /*version*/) if ((prop = node.property ("flags")) != 0) { _flags = Flag (string_2_enum (prop->value(), _flags)); + + // ZG: Waves TracksLive does not support destructive mode + _flags = Flag (_flags & ~Destructive); } if ((prop = node.property (X_("capture-alignment"))) != 0) { diff --git a/libs/ardour/midi_track.cc b/libs/ardour/midi_track.cc index 6f679a74f3..363155942e 100644 --- a/libs/ardour/midi_track.cc +++ b/libs/ardour/midi_track.cc @@ -112,7 +112,8 @@ MidiTrack::set_diskstream (boost::shared_ptr ds) mds->reset_tracker (); _diskstream->set_track (this); - _diskstream->set_destructive (_mode == Destructive); + //GZ: Waves TracksLive does not support destructive Audio Tracks + _diskstream->set_destructive (false/*_mode == Destructive*/); _diskstream->set_record_enabled (false); _diskstream_data_recorded_connection.disconnect (); diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc index 020c785841..8131fc6a7c 100644 --- a/libs/ardour/session.cc +++ b/libs/ardour/session.cc @@ -4406,19 +4406,13 @@ Session::format_audio_source_name (const string& legalized_base, uint32_t nchan, { ostringstream sstr; const string ext = native_header_format_extension (config.get_native_file_header_format(), DataType::AUDIO); - - if (destructive) { - sstr << 'T'; - sstr << setfill ('0') << setw (4) << cnt; - sstr << legalized_base; - } else { - sstr << legalized_base; - - if (take_required || related_exists) { - sstr << '-'; - sstr << cnt; - } - } + + sstr << legalized_base; + + if (take_required || related_exists) { + sstr << '-'; + sstr << cnt; + } if (nchan == 2) { if (chan == 0) { diff --git a/libs/ardour/source.cc b/libs/ardour/source.cc index 03039fea5b..b925ac58a7 100644 --- a/libs/ardour/source.cc +++ b/libs/ardour/source.cc @@ -134,6 +134,9 @@ Source::set_state (const XMLNode& node, int version) if ((prop = node.property (X_("flags"))) != 0) { _flags = Flag (string_2_enum (prop->value(), _flags)); + + //GZ: Waves TracksLive does not support Destructive mode + _flags = Flag (_flags & ~Destructive); } else { _flags = Flag (0);