DummyBackend: fix midi event mux+sorting
[ardour.git] / libs / ardour / source.cc
index 4c582f3ad741146d4af653e96ce5a5380dac5181..03039fea5baf5f9abc8205132e821f51fb4645ec 100644 (file)
@@ -19,8 +19,6 @@
 
 #include <sys/stat.h>
 #include <unistd.h>
-#include <fcntl.h>
-#include <poll.h>
 #include <float.h>
 #include <cerrno>
 #include <ctime>
@@ -29,7 +27,7 @@
 #include <algorithm>
 #include <fstream>
 
-#include <glibmm/thread.h>
+#include <glibmm/threads.h>
 #include <glibmm/miscutils.h>
 #include <glibmm/fileutils.h>
 #include "pbd/xml++.h"
@@ -162,7 +160,7 @@ Source::set_state (const XMLNode& node, int version)
 bool
 Source::has_been_analysed() const
 {
-       Glib::Mutex::Lock lm (_analysis_lock);
+       Glib::Threads::Mutex::Lock lm (_analysis_lock);
        return _analysed;
 }
 
@@ -170,7 +168,7 @@ void
 Source::set_been_analysed (bool yn)
 {
        {
-               Glib::Mutex::Lock lm (_analysis_lock);
+               Glib::Threads::Mutex::Lock lm (_analysis_lock);
                _analysed = yn;
        }
 
@@ -263,7 +261,7 @@ Source::mark_for_remove ()
 }
 
 void
-Source::set_timeline_position (int64_t pos)
+Source::set_timeline_position (framepos_t pos)
 {
        _timeline_position = pos;
 }
@@ -292,14 +290,14 @@ void
 Source::dec_use_count ()
 {
 #ifndef NDEBUG
-        gint oldval = g_atomic_int_exchange_and_add (&_use_count, -1);
+        gint oldval = g_atomic_int_add (&_use_count, -1);
         if (oldval <= 0) {
                 cerr << "Bad use dec for " << name() << endl;
                 abort ();
         }
         assert (oldval > 0);
 #else
-        g_atomic_int_exchange_and_add (&_use_count, -1);
+        g_atomic_int_add (&_use_count, -1);
 #endif
 }