ALSA fixes, MIDI fixes and some new features, misc fixes and a
[terminatorX.git] / src / tX_engine.cc
index 165646da42e4f477d6d318437ab5d32d9bd0cf5c..c439c18d03bac9e9dd0d94b1e33d8561e982555d 100644 (file)
@@ -126,7 +126,6 @@ void tX_engine :: loop() {
        }
 }
 
-
 void *engine_thread_entry(void *engine_void) {
        tX_engine *engine=(tX_engine*) engine_void;
        int result;
@@ -150,6 +149,11 @@ void *engine_thread_entry(void *engine_void) {
                }
        }
        
+#ifdef USE_JACK
+       /* Create the client now, so the user has something to connect to. */
+       tX_jack_client *jack_client=tX_jack_client::get_instance();
+#endif 
+       
        engine->loop();
        
        tX_debug("engine_thread_entry() - Engine thread terminating.");
@@ -185,7 +189,7 @@ tX_engine :: tX_engine() {
                
                result=pthread_create(&thread, &pattr, engine_thread_entry, (void *) this);
        } else {
-               tX_debug("tX_engine() - Lacking root privileges - no realtime scheduling!");
+               tX_debug("tX_engine() - Lacking root privileges - no realtime scheduling.");
 #endif         
                result=pthread_create(&thread, NULL, engine_thread_entry, (void *) this);
 #ifdef USE_SCHEDULER           
@@ -245,6 +249,12 @@ tX_engine_error tX_engine :: run() {
                        device=new tX_audiodevice_alsa(); 
                break;
 #endif
+
+#ifdef USE_JACK
+               case JACK:
+                       device=new tX_audiodevice_jack();
+               break;
+#endif
                
                default:
                        device=NULL; return ERROR_AUDIO;