fix LTC slave latency compensation typo
[ardour.git] / libs / ardour / graph.cc
index c38106506edc8f21146d839a2313f92686aea00d..d2fbdbf552f3313c896380e40196e3b62806f093 100644 (file)
@@ -19,6 +19,7 @@
 */
 #include <stdio.h>
 #include <cmath>
+#include <xmmintrin.h>
 
 #include "pbd/compose.h"
 #include "pbd/debug_rt_alloc.h"
@@ -100,21 +101,25 @@ Graph::reset_thread_list ()
                 return;
         }
 
-        Glib::Mutex::Lock lm (_session.engine().process_lock());
+        Glib::Threads::Mutex::Lock lm (_session.engine().process_lock());
        pthread_t a_thread;
 
         if (!_thread_list.empty()) {
                 drop_threads ();
         }
 
-       if (AudioEngine::instance()->create_process_thread (boost::bind (&Graph::main_thread, this), &a_thread, 100000) == 0) {
-               _thread_list.push_back (a_thread);
+       if (AudioEngine::instance()->create_process_thread (boost::bind (&Graph::main_thread, this), &a_thread, 100000) != 0) {
+               throw failed_constructor ();
        }
 
+       _thread_list.push_back (a_thread);
+
         for (uint32_t i = 1; i < num_threads; ++i) {
-               if (AudioEngine::instance()->create_process_thread (boost::bind (&Graph::helper_thread, this), &a_thread, 100000) == 0) {
-                       _thread_list.push_back (a_thread);
+               if (AudioEngine::instance()->create_process_thread (boost::bind (&Graph::helper_thread, this), &a_thread, 100000) != 0) {
+                       throw failed_constructor ();
                }
+               
+               _thread_list.push_back (a_thread);
         }
 }
 
@@ -157,7 +162,7 @@ Graph::drop_threads ()
 void
 Graph::clear_other_chain ()
 {
-        Glib::Mutex::Lock ls (_swap_mutex);
+        Glib::Threads::Mutex::Lock ls (_swap_mutex);
 
         while (1) {
                 if (_setup_chain != _pending_chain) {
@@ -270,7 +275,7 @@ Graph::restart_cycle()
 void
 Graph::rechain (boost::shared_ptr<RouteList> routelist, GraphEdges const & edges)
 {
-        Glib::Mutex::Lock ls (_swap_mutex);
+        Glib::Threads::Mutex::Lock ls (_swap_mutex);
 
         int chain = _setup_chain;
         DEBUG_TRACE (DEBUG::Graph, string_compose ("============== setup %1\n", chain));