Merging from trunk
[ardour.git] / libs / ardour / region.cc
index 4a6aea07b81c0dc17f5394e581f64bbd2ebfb794..8c27a3bebc699732449943c0cf7bf9d6a959a0b9 100644 (file)
@@ -26,7 +26,7 @@
 #include <sigc++/bind.h>
 #include <sigc++/class_slot.h>
 
-#include <pbd/lockmonitor.h>
+#include <glibmm/thread.h>
 #include <pbd/xml++.h>
 
 #include <ardour/region.h>
@@ -37,6 +37,7 @@
 
 using namespace std;
 using namespace ARDOUR;
+using namespace PBD;
 
 Change Region::FadeChanged = ARDOUR::new_change ();
 Change Region::SyncOffsetChanged = ARDOUR::new_change ();
@@ -178,7 +179,7 @@ Region::restore_and_return_flags (RegionState& state)
        Change what_changed = Change (0);
 
        {
-               LockMonitor lm (lock, __LINE__, __FILE__);
+               Glib::Mutex::Lock lm (lock);
                
                if (_start != state._start) {
                        what_changed = Change (what_changed|StartChanged);      
@@ -843,7 +844,7 @@ Region::state (bool full_state)
        XMLNode *node = new XMLNode ("Region");
        char buf[64];
        
-       snprintf (buf, sizeof (buf), "%llu", _id);
+       snprintf (buf, sizeof (buf), "%" PRIu64, _id);
        node->add_property ("id", buf);
        node->add_property ("name", _name);
        snprintf (buf, sizeof (buf), "%u", _start);
@@ -885,7 +886,7 @@ Region::set_state (const XMLNode& node)
                return -1;
        }
 
-       sscanf (prop->value().c_str(), "%llu", &_id);
+       sscanf (prop->value().c_str(), "%" PRIu64, &_id);
 
        if ((prop = node.property ("name")) == 0) {
                error << _("Session: XMLNode describing a Region is incomplete (no name)") << endmsg;
@@ -947,7 +948,7 @@ Region::thaw (const string& why)
        Change what_changed = Change (0);
 
        {
-               LockMonitor lm (lock, __LINE__, __FILE__);
+               Glib::Mutex::Lock lm (lock);
 
                if (_frozen && --_frozen > 0) {
                        return;
@@ -978,7 +979,7 @@ void
 Region::send_change (Change what_changed)
 {
        {
-               LockMonitor lm (lock, __LINE__, __FILE__);
+               Glib::Mutex::Lock lm (lock);
                if (_frozen) {
                        pending_changed = Change (pending_changed|what_changed);
                        return;