mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-07 23:35:03 +01:00
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
5 changed files with 31 additions and 26 deletions
|
|
@ -1,3 +1,3 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
source ardev_common.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&);
|
void bounce_range (jack_nframes_t start, jack_nframes_t end, InterThreadInfo&);
|
||||||
|
|
||||||
XMLNode& get_state();
|
XMLNode& get_state();
|
||||||
|
XMLNode& get_template();
|
||||||
int set_state(const XMLNode& node);
|
int set_state(const XMLNode& node);
|
||||||
|
|
||||||
MIDI::Controllable& midi_rec_enable_control() {
|
MIDI::Controllable& midi_rec_enable_control() {
|
||||||
|
|
@ -102,6 +103,8 @@ class AudioTrack : public Route
|
||||||
MeterPoint _saved_meter_point;
|
MeterPoint _saved_meter_point;
|
||||||
TrackMode _mode;
|
TrackMode _mode;
|
||||||
|
|
||||||
|
XMLNode& state (bool full);
|
||||||
|
|
||||||
void passthru_silence (jack_nframes_t start_frame, jack_nframes_t end_frame,
|
void passthru_silence (jack_nframes_t start_frame, jack_nframes_t end_frame,
|
||||||
jack_nframes_t nframes, jack_nframes_t offset, int declick,
|
jack_nframes_t nframes, jack_nframes_t offset, int declick,
|
||||||
bool meter);
|
bool meter);
|
||||||
|
|
@ -144,8 +147,6 @@ class AudioTrack : public Route
|
||||||
sigc::connection recenable_connection;
|
sigc::connection recenable_connection;
|
||||||
sigc::connection ic_connection;
|
sigc::connection ic_connection;
|
||||||
|
|
||||||
XMLNode& state(bool);
|
|
||||||
|
|
||||||
int deprecated_use_diskstream_connections ();
|
int deprecated_use_diskstream_connections ();
|
||||||
void set_state_part_two ();
|
void set_state_part_two ();
|
||||||
void set_state_part_three ();
|
void set_state_part_three ();
|
||||||
|
|
|
||||||
|
|
@ -200,7 +200,7 @@ class Route : public IO
|
||||||
|
|
||||||
XMLNode& get_state();
|
XMLNode& get_state();
|
||||||
int set_state(const XMLNode& node);
|
int set_state(const XMLNode& node);
|
||||||
XMLNode& get_template();
|
virtual XMLNode& get_template();
|
||||||
|
|
||||||
sigc::signal<void,void*> SelectedChanged;
|
sigc::signal<void,void*> SelectedChanged;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -243,24 +243,6 @@ AudioTrack::set_meter_point (MeterPoint p, void *src)
|
||||||
Route::set_meter_point (p, 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
|
int
|
||||||
AudioTrack::set_state (const XMLNode& node)
|
AudioTrack::set_state (const XMLNode& node)
|
||||||
{
|
{
|
||||||
|
|
@ -363,10 +345,22 @@ AudioTrack::set_state (const XMLNode& node)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
XMLNode&
|
||||||
|
AudioTrack::get_template ()
|
||||||
|
{
|
||||||
|
return state (false);
|
||||||
|
}
|
||||||
|
|
||||||
XMLNode&
|
XMLNode&
|
||||||
AudioTrack::get_state ()
|
AudioTrack::get_state ()
|
||||||
{
|
{
|
||||||
XMLNode& root (Route::get_state());
|
return state (true);
|
||||||
|
}
|
||||||
|
|
||||||
|
XMLNode&
|
||||||
|
AudioTrack::state(bool full_state)
|
||||||
|
{
|
||||||
|
XMLNode& root (Route::state(full_state));
|
||||||
XMLNode* freeze_node;
|
XMLNode* freeze_node;
|
||||||
char buf[32];
|
char buf[32];
|
||||||
|
|
||||||
|
|
@ -441,6 +435,15 @@ AudioTrack::get_state()
|
||||||
break;
|
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;
|
return root;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -470,7 +470,8 @@ DiskStream::use_destructive_playlist ()
|
||||||
Playlist::RegionList* rl = _playlist->regions_at (0);
|
Playlist::RegionList* rl = _playlist->regions_at (0);
|
||||||
|
|
||||||
if (rl->empty()) {
|
if (rl->empty()) {
|
||||||
throw failed_constructor();
|
reset_write_sources (false, true);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
AudioRegion* region = dynamic_cast<AudioRegion*> (rl->front());
|
AudioRegion* region = dynamic_cast<AudioRegion*> (rl->front());
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue