Merging undo branch into trunk. It compiles and works for limited tests. Keep
[ardour.git] / libs / ardour / session_export.cc
index 183b6df2373a023fc9578c26cf059a81796913e8..b39c4f22185cb4398c181b3400420dd76d28f0b9 100644 (file)
 #include <ardour/sndfile_helpers.h>
 #include <ardour/port.h>
 #include <ardour/audioengine.h>
-#include <ardour/diskstream.h>
+#include <ardour/audio_diskstream.h>
 #include <ardour/panner.h>
 
 #include "i18n.h"
 
 using namespace std;
 using namespace ARDOUR;
-//using namespace sigc;
+using namespace PBD;
 
 static int
 convert_spec_to_info (AudioExportSpecification& spec, SF_INFO& sfinfo)
@@ -485,8 +485,9 @@ Session::prepare_to_export (AudioExportSpecification& spec)
        /* take everyone out of awrite to avoid disasters */
 
        {
-               Glib::RWLock::ReaderLock lm (route_lock);
-               for (RouteList::iterator i = routes.begin(); i != routes.end(); ++i) {
+               boost::shared_ptr<RouteList> r = routes.reader ();
+
+               for (RouteList::iterator i = r->begin(); i != r->end(); ++i) {
                        (*i)->protect_automation ();
                }
        }
@@ -495,7 +496,7 @@ Session::prepare_to_export (AudioExportSpecification& spec)
 
        {
                Glib::RWLock::ReaderLock lm (diskstream_lock);
-               for (DiskStreamList::iterator i = diskstreams.begin(); i != diskstreams.end(); ++i) {
+               for (DiskstreamList::iterator i = diskstreams.begin(); i != diskstreams.end(); ++i) {
                        if ((*i)-> seek (spec.start_frame, true)) {
                                error << string_compose (_("%1: cannot seek to %2 for export"),
                                                  (*i)->name(), spec.start_frame)