summaryrefslogtreecommitdiff
path: root/libs/ardour/session_state.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2006-11-02 16:03:58 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2006-11-02 16:03:58 +0000
commitf8f7323f6fa11323810f1c640edbe0014c832306 (patch)
tree7e4a905fc5dd12386fe140ef3bacd62836c46b7b /libs/ardour/session_state.cc
parent39aec8e0ca34feb78be8cc526fa57687b5cbe642 (diff)
fix unset timeline position for destructive sources; fix duplicate, unmanaged waveviews being created by a thread race
git-svn-id: svn://localhost/ardour2/trunk@1060 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/session_state.cc')
-rw-r--r--libs/ardour/session_state.cc66
1 files changed, 34 insertions, 32 deletions
diff --git a/libs/ardour/session_state.cc b/libs/ardour/session_state.cc
index c69908285c..d9c82f546b 100644
--- a/libs/ardour/session_state.cc
+++ b/libs/ardour/session_state.cc
@@ -1039,11 +1039,11 @@ Session::set_state (const XMLNode& node)
Path
extra
Options/Config
+ Locations
Sources
AudioRegions
AudioDiskstreams
Connections
- Locations
Routes
EditGroups
MixGroups
@@ -1066,6 +1066,39 @@ Session::set_state (const XMLNode& node)
error << _("Session: XML state has no options section") << endmsg;
}
+ if ((child = find_named_node (node, "Locations")) == 0) {
+ error << _("Session: XML state has no locations section") << endmsg;
+ goto out;
+ } else if (_locations.set_state (*child)) {
+ goto out;
+ }
+
+ Location* location;
+
+ if ((location = _locations.auto_loop_location()) != 0) {
+ set_auto_loop_location (location);
+ }
+
+ if ((location = _locations.auto_punch_location()) != 0) {
+ set_auto_punch_location (location);
+ }
+
+ if ((location = _locations.end_location()) == 0) {
+ _locations.add (end_location);
+ } else {
+ delete end_location;
+ end_location = location;
+ }
+
+ if ((location = _locations.start_location()) == 0) {
+ _locations.add (start_location);
+ } else {
+ delete start_location;
+ start_location = location;
+ }
+
+ AudioFileSource::set_header_position_offset (start_location->start());
+
if ((child = find_named_node (node, "Sources")) == 0) {
error << _("Session: XML state has no sources section") << endmsg;
goto out;
@@ -1113,37 +1146,6 @@ Session::set_state (const XMLNode& node)
goto out;
}
- if ((child = find_named_node (node, "Locations")) == 0) {
- error << _("Session: XML state has no locations section") << endmsg;
- goto out;
- } else if (_locations.set_state (*child)) {
- goto out;
- }
-
- Location* location;
-
- if ((location = _locations.auto_loop_location()) != 0) {
- set_auto_loop_location (location);
- }
-
- if ((location = _locations.auto_punch_location()) != 0) {
- set_auto_punch_location (location);
- }
-
- if ((location = _locations.end_location()) == 0) {
- _locations.add (end_location);
- } else {
- delete end_location;
- end_location = location;
- }
-
- if ((location = _locations.start_location()) == 0) {
- _locations.add (start_location);
- } else {
- delete start_location;
- start_location = location;
- }
-
if ((child = find_named_node (node, "EditGroups")) == 0) {
error << _("Session: XML state has no edit groups section") << endmsg;
goto out;