likely fixes for problems loading templates with destructive tracks. Note that old templates with such tracks will need to be re-generated, since they are lacking information required for the session setup to succeed
git-svn-id: svn://localhost/trunk/ardour2@452 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
474acbb9a9
commit
bcf432184d
|
@ -1,3 +1,3 @@
|
|||
#!/bin/sh
|
||||
source ardev_common.sh
|
||||
exec valgrind --num-callers=12 --tool=memcheck ./ardour.bin --novst $*
|
||||
exec valgrind --num-callers=15 --tool=memcheck ./ardour.bin --novst $*
|
||||
|
|
|
@ -85,6 +85,7 @@ class AudioTrack : public Route
|
|||
void bounce_range (jack_nframes_t start, jack_nframes_t end, InterThreadInfo&);
|
||||
|
||||
XMLNode& get_state();
|
||||
XMLNode& get_template();
|
||||
int set_state(const XMLNode& node);
|
||||
|
||||
MIDI::Controllable& midi_rec_enable_control() {
|
||||
|
@ -102,6 +103,8 @@ class AudioTrack : public Route
|
|||
MeterPoint _saved_meter_point;
|
||||
TrackMode _mode;
|
||||
|
||||
XMLNode& state (bool full);
|
||||
|
||||
void passthru_silence (jack_nframes_t start_frame, jack_nframes_t end_frame,
|
||||
jack_nframes_t nframes, jack_nframes_t offset, int declick,
|
||||
bool meter);
|
||||
|
@ -144,8 +147,6 @@ class AudioTrack : public Route
|
|||
sigc::connection recenable_connection;
|
||||
sigc::connection ic_connection;
|
||||
|
||||
XMLNode& state(bool);
|
||||
|
||||
int deprecated_use_diskstream_connections ();
|
||||
void set_state_part_two ();
|
||||
void set_state_part_three ();
|
||||
|
|
|
@ -200,7 +200,7 @@ class Route : public IO
|
|||
|
||||
XMLNode& get_state();
|
||||
int set_state(const XMLNode& node);
|
||||
XMLNode& get_template();
|
||||
virtual XMLNode& get_template();
|
||||
|
||||
sigc::signal<void,void*> SelectedChanged;
|
||||
|
||||
|
|
|
@ -243,24 +243,6 @@ AudioTrack::set_meter_point (MeterPoint p, void *src)
|
|||
Route::set_meter_point (p, src);
|
||||
}
|
||||
|
||||
XMLNode&
|
||||
AudioTrack::state(bool full_state)
|
||||
{
|
||||
XMLNode& track_state (Route::state (full_state));
|
||||
char buf[64];
|
||||
|
||||
/* we don't return diskstream state because we don't
|
||||
own the diskstream exclusively. control of the diskstream
|
||||
state is ceded to the Session, even if we create the
|
||||
diskstream.
|
||||
*/
|
||||
|
||||
snprintf (buf, sizeof (buf), "%" PRIu64, diskstream->id());
|
||||
track_state.add_property ("diskstream-id", buf);
|
||||
|
||||
return track_state;
|
||||
}
|
||||
|
||||
int
|
||||
AudioTrack::set_state (const XMLNode& node)
|
||||
{
|
||||
|
@ -363,10 +345,22 @@ AudioTrack::set_state (const XMLNode& node)
|
|||
return 0;
|
||||
}
|
||||
|
||||
XMLNode&
|
||||
AudioTrack::get_state()
|
||||
XMLNode&
|
||||
AudioTrack::get_template ()
|
||||
{
|
||||
XMLNode& root (Route::get_state());
|
||||
return state (false);
|
||||
}
|
||||
|
||||
XMLNode&
|
||||
AudioTrack::get_state ()
|
||||
{
|
||||
return state (true);
|
||||
}
|
||||
|
||||
XMLNode&
|
||||
AudioTrack::state(bool full_state)
|
||||
{
|
||||
XMLNode& root (Route::state(full_state));
|
||||
XMLNode* freeze_node;
|
||||
char buf[32];
|
||||
|
||||
|
@ -441,6 +435,15 @@ AudioTrack::get_state()
|
|||
break;
|
||||
}
|
||||
|
||||
/* we don't return diskstream state because we don't
|
||||
own the diskstream exclusively. control of the diskstream
|
||||
state is ceded to the Session, even if we create the
|
||||
diskstream.
|
||||
*/
|
||||
|
||||
snprintf (buf, sizeof (buf), "%" PRIu64, diskstream->id());
|
||||
root.add_property ("diskstream-id", buf);
|
||||
|
||||
return root;
|
||||
}
|
||||
|
||||
|
|
|
@ -470,7 +470,8 @@ DiskStream::use_destructive_playlist ()
|
|||
Playlist::RegionList* rl = _playlist->regions_at (0);
|
||||
|
||||
if (rl->empty()) {
|
||||
throw failed_constructor();
|
||||
reset_write_sources (false, true);
|
||||
return;
|
||||
}
|
||||
|
||||
AudioRegion* region = dynamic_cast<AudioRegion*> (rl->front());
|
||||
|
|
Loading…
Reference in New Issue