use JACK thread creation functions to create process-graph threads; provide GUI contr...
[ardour.git] / libs / ardour / ardour / audioengine.h
index 63f9afeb2bb1a0f051821d2e189fad817bd00d88..9a0104b8fe08748b50c4338ac84f8a250531adcc 100644 (file)
@@ -224,7 +224,7 @@ _      the regular process() call to session->process() is not made.
 
        /* this signal is sent if JACK ever disconnects us */
 
-       PBD::Signal0<void> Halted;
+       PBD::Signal1<void,const char*> Halted;
 
        /* these two are emitted when the engine itself is
           started and stopped
@@ -245,6 +245,8 @@ _      the regular process() call to session->process() is not made.
        static AudioEngine* instance() { return _instance; }
        void died ();
 
+        pthread_t create_process_thread (boost::function<void()>, size_t stacksize);
+
   private:
        static AudioEngine*       _instance;
 
@@ -306,6 +308,7 @@ _      the regular process() call to session->process() is not made.
        int connect_to_jack (std::string client_name, std::string session_uuid);
 
        static void halted (void *);
+       static void halted_info (jack_status_t,const char*,void *);
 
        void meter_thread ();
        void start_metering_thread ();
@@ -315,6 +318,17 @@ _     the regular process() call to session->process() is not made.
        static gint      m_meter_exit;
 
         ProcessThread* _main_thread;
+
+        struct ThreadData {
+            AudioEngine* engine;
+            boost::function<void()> f;
+            size_t stacksize;
+            
+            ThreadData (AudioEngine* ae, boost::function<void()> fp, size_t stacksz) 
+            : engine (ae) , f (fp) , stacksize (stacksz) {}
+        };
+        
+        static void* _start_process_thread (void*);
 };
 
 } // namespace ARDOUR