session-utils tweaks
authorRobin Gareus <robin@gareus.org>
Thu, 2 Jun 2016 20:02:37 +0000 (22:02 +0200)
committerRobin Gareus <robin@gareus.org>
Thu, 2 Jun 2016 20:25:41 +0000 (22:25 +0200)
* emulate 256 i/o (don't loose connections)
* allow "silent" start

session_utils/common.cc
session_utils/common.h

index 9353c760bdc07c1a4d67efb353808dc7691d037a..2abfb32d3cb3a1842df3750f67659d112d4e08e0 100644 (file)
@@ -86,7 +86,7 @@ class MyEventLoop : public sigc::trackable, public EventLoop
 static MyEventLoop *event_loop;
 
 void
-SessionUtils::init ()
+SessionUtils::init (bool print_log)
 {
        if (!ARDOUR::init (false, true, localedir)) {
                cerr << "Ardour failed to initialize\n" << endl;
@@ -97,10 +97,12 @@ SessionUtils::init ()
        EventLoop::set_event_loop_for_thread (event_loop);
        SessionEvent::create_per_thread_pool ("util", 512);
 
-       test_receiver.listen_to (error);
-       test_receiver.listen_to (info);
-       test_receiver.listen_to (fatal);
-       test_receiver.listen_to (warning);
+       if (print_log) {
+               test_receiver.listen_to (error);
+               test_receiver.listen_to (info);
+               test_receiver.listen_to (fatal);
+               test_receiver.listen_to (warning);
+       }
 }
 
 // TODO return NULL, rather than exit() ?!
@@ -113,6 +115,9 @@ static Session * _load_session (string dir, string state)
                ::exit (EXIT_FAILURE);
        }
 
+       engine->set_input_channels (256);
+       engine->set_output_channels (256);
+
        float sr;
        SampleFormat sf;
 
index 5263e84b5a48df36dc3e324001ce8da3fd77a7c6..9077fbe92828ab70f5d014ae58decdd81fa564ec 100644 (file)
@@ -16,7 +16,7 @@ class TestReceiver : public Receiver
 namespace SessionUtils {
 
        /** initialize libardour */
-       void init ();
+       void init (bool print_log = true);
 
        /** clean up, stop Processing Engine
         * @param s Session to close (may me NULL)