Merged with trunk revision 600
[ardour.git] / libs / ardour / session_export.cc
index 0ccea59b81ccc66845bda18d4c342c3dcecc3882..f6ea0c9f3ff867a9e9e5db2f320514f873c501db 100644 (file)
@@ -37,7 +37,7 @@
 #include <sigc++/bind.h>
 
 #include <pbd/error.h>
-#include <pbd/lockmonitor.h>
+#include <glibmm/thread.h>
 
 #include <ardour/gdither.h>
 #include <ardour/timestamps.h>
@@ -47,7 +47,7 @@
 #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"
@@ -485,7 +485,7 @@ Session::prepare_to_export (AudioExportSpecification& spec)
        /* take everyone out of awrite to avoid disasters */
 
        {
-               RWLockMonitor lm (route_lock, false, __LINE__, __FILE__);
+               Glib::RWLock::ReaderLock lm (route_lock);
                for (RouteList::iterator i = routes.begin(); i != routes.end(); ++i) {
                        (*i)->protect_automation ();
                }
@@ -494,8 +494,8 @@ Session::prepare_to_export (AudioExportSpecification& spec)
        /* get everyone to the right position */
 
        {
-               RWLockMonitor lm (diskstream_lock, false, __LINE__, __FILE__);
-               for (DiskStreamList::iterator i = diskstreams.begin(); i != diskstreams.end(); ++i) {
+               Glib::RWLock::ReaderLock lm (diskstream_lock);
+               for (AudioDiskstreamList::iterator i = audio_diskstreams.begin(); i != audio_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)
@@ -508,7 +508,7 @@ Session::prepare_to_export (AudioExportSpecification& spec)
        /* make sure we are actually rolling */
 
        if (get_record_enabled()) {
-               disable_record ();
+               disable_record (false);
        }
 
        _exporting = true;
@@ -524,7 +524,7 @@ Session::prepare_to_export (AudioExportSpecification& spec)
 
        set_transport_speed (1.0, false);
        butler_transport_work ();
-       atomic_set (&butler_should_do_transport_work, 0);
+       g_atomic_int_set (&butler_should_do_transport_work, 0);
        post_transport ();
 
        /* we are ready to go ... */