Connect Script Manager "Edit" -> Lua Scripting Window
[ardour.git] / headless / load_session.cc
index dc2644c4288567eb581a44bb022b04e414681f15..cce6a0ef5a10ec935f03d6b962e44d8d12152352 100644 (file)
@@ -17,6 +17,7 @@ using namespace ARDOUR;
 using namespace PBD;
 
 #ifdef PLATFORM_WINDOWS
+#include <windows.h>
 #define sleep(X) Sleep((X) * 1000)
 #endif
 
@@ -85,11 +86,12 @@ print_help ()
 
 int main (int argc, char* argv[])
 {
-       const char *optstring = "vhdD:c:VOU:P";
+       const char *optstring = "vhBdD:c:VOU:P";
 
        const struct option longopts[] = {
                { "version", 0, 0, 'v' },
                { "help", 0, 0, 'h' },
+               { "bypass-plugins", 1, 0, 'B' },
                { "disable-plugins", 1, 0, 'd' },
                { "debug", 1, 0, 'D' },
                { "name", 1, 0, 'c' },
@@ -127,6 +129,10 @@ int main (int argc, char* argv[])
                        backend_client_name = optarg;
                        break;
 
+               case 'B':
+                       ARDOUR::Session::set_bypass_all_loaded_plugins (true);
+                       break;
+
                case 'd':
                        ARDOUR::Session::set_disable_all_loaded_plugins (true);
                        break;
@@ -172,7 +178,7 @@ int main (int argc, char* argv[])
        }
 
        Session* s = 0;
-       
+
        try {
                s = load_session (argv[optind], argv[optind+1]);
        } catch (failed_constructor& e) {
@@ -190,7 +196,7 @@ int main (int argc, char* argv[])
        }
 
        s->request_transport_speed (1.0);
-       
+
        sleep (-1);
 
        AudioEngine::instance()->remove_session ();