diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2006-04-11 03:15:57 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2006-04-11 03:15:57 +0000 |
commit | bcf432184d84d53aa12cbdd2aa3176a9019cab80 (patch) | |
tree | 76cb1f7d28c2fc0c539a00483a24308128100bf1 /libs/ardour/audio_track.cc | |
parent | 474acbb9a925b035af8f2cb3df764121127c4496 (diff) |
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
Diffstat (limited to 'libs/ardour/audio_track.cc')
-rw-r--r-- | libs/ardour/audio_track.cc | 43 |
1 files changed, 23 insertions, 20 deletions
diff --git a/libs/ardour/audio_track.cc b/libs/ardour/audio_track.cc index ae3d1719c7..702d167a4f 100644 --- a/libs/ardour/audio_track.cc +++ b/libs/ardour/audio_track.cc @@ -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_template () +{ + return state (false); +} + +XMLNode& +AudioTrack::get_state () +{ + return state (true); +} + XMLNode& -AudioTrack::get_state() +AudioTrack::state(bool full_state) { - XMLNode& root (Route::get_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; } |