mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-05 05:05:43 +01:00
[Summary] Disabled Destructive mode for AudiTrack, DiskStream and Source which is not used in Tracks Live and causes problems. Change has been made per Igor's request.
This commit is contained in:
parent
63cac3f16a
commit
701f98d53e
7 changed files with 34 additions and 25 deletions
|
|
@ -385,9 +385,8 @@ AudioDiskstream::use_destructive_playlist ()
|
|||
ChannelList::iterator chan;
|
||||
boost::shared_ptr<ChannelList> 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<AudioFileSource>(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;
|
||||
|
|
|
|||
|
|
@ -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<Diskstream> 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<XMLNode*> (&node);
|
||||
|
||||
if (_session.state_of_the_state() & Session::Loading) {
|
||||
|
|
|
|||
|
|
@ -323,7 +323,8 @@ Auditioner::set_diskstream (boost::shared_ptr<Diskstream> 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);
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -112,7 +112,8 @@ MidiTrack::set_diskstream (boost::shared_ptr<Diskstream> 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 ();
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue