diff options
author | Tim Mayberry <mojofunk@gmail.com> | 2013-07-25 15:06:49 +1000 |
---|---|---|
committer | Tim Mayberry <mojofunk@gmail.com> | 2013-09-06 14:30:19 +1000 |
commit | 538a1e79c40dfd2fb8d673062fac3844268546c4 (patch) | |
tree | 32d095dbd5402f11e11e30a5ad7773beb119a292 /libs/ardour | |
parent | d9994c10b4215939b4513826d8d690a6d243b42e (diff) |
Remove ARDOUR::start_jack_server now that jack autostart works on windows
Diffstat (limited to 'libs/ardour')
-rw-r--r-- | libs/ardour/ardour/jack_utils.h | 8 | ||||
-rw-r--r-- | libs/ardour/jack_utils.cc | 40 | ||||
-rw-r--r-- | libs/ardour/test/jack_utils_test.cc | 43 | ||||
-rw-r--r-- | libs/ardour/test/jack_utils_test.h | 2 |
4 files changed, 0 insertions, 93 deletions
diff --git a/libs/ardour/ardour/jack_utils.h b/libs/ardour/ardour/jack_utils.h index 353724f079..40eb30f9ea 100644 --- a/libs/ardour/ardour/jack_utils.h +++ b/libs/ardour/ardour/jack_utils.h @@ -250,12 +250,4 @@ namespace ARDOUR { * We don't need this at the moment because the gui stores all its settings */ //std::string get_jack_command_line_from_config_file (const std::string& config_file_path); - - /** - * Temporary for WIN32 only as jack_client_open doesn't start the server on that platform - * - * @return true if server was able to be started - */ - bool start_jack_server (const std::string& command_line); - } diff --git a/libs/ardour/jack_utils.cc b/libs/ardour/jack_utils.cc index ecbf8976fd..d9e5f00cca 100644 --- a/libs/ardour/jack_utils.cc +++ b/libs/ardour/jack_utils.cc @@ -916,43 +916,3 @@ ARDOUR::write_jack_config_file (const std::string& config_file_path, const strin jackdrc.close (); return true; } - -bool -ARDOUR::start_jack_server (const string& command_line) -{ -#ifdef PLATFORM_WINDOWS - STARTUPINFO si; - PROCESS_INFORMATION pi; - char * cmdline = g_strdup (command_line.c_str()); - - memset (&si, 0, sizeof (si)); - si.cb = sizeof (&si); - memset (&pi, 0, sizeof (pi)); - - if (!CreateProcess ( - NULL, // No module name, use command line - cmdline, - NULL, // Process handle not inheritable - NULL, // Thread handle not inheritable - FALSE, // set handle inheritance to false - 0, // No creation flags - NULL, // Use parents environment block - NULL, // Use parents starting directory - &si, - &pi)) - { - error << string_compose ("cannot start JACK server: %s", g_win32_error_message (GetLastError ())) << endmsg; - } - - g_free (cmdline); - - // wait for 2 seconds for server to start - for (int i = 0; i < 8; ++i) { - Sleep (250); // 1/4 second - if (jack_server_running ()) return true; - } -#else - (void) command_line; -#endif - return false; -} diff --git a/libs/ardour/test/jack_utils_test.cc b/libs/ardour/test/jack_utils_test.cc index ce92955b7d..9d5e433192 100644 --- a/libs/ardour/test/jack_utils_test.cc +++ b/libs/ardour/test/jack_utils_test.cc @@ -270,46 +270,3 @@ JackUtilsTest::test_command_line () cout << "Default JACK command line: " << command_line << endl; } - -void -JackUtilsTest::test_start_server () -{ -#ifdef PLATFORM_WINDOWS - cout << endl; - - JackCommandLineOptions options; - - CPPUNIT_ASSERT (get_jack_default_server_path (options.server_path)); - - cout << "Starting JACK server at path: " << options.server_path << endl; - - get_jack_default_audio_driver_name (options.driver); - - vector<string> devices = get_jack_device_names_for_audio_driver (options.driver); - - if (!devices.empty()) { - options.input_device = devices.front (); - options.output_device = devices.front (); - } else { - cout << "No audio devices available using default JACK driver using Dummy driver" << endl; - options.driver = dummy_driver_name; - devices = get_jack_device_names_for_audio_driver (options.driver); - CPPUNIT_ASSERT (!devices.empty ()); - options.input_device = devices.front (); - options.output_device = devices.front (); - } - - string command_line; - // this at least should create a valid jack command line - CPPUNIT_ASSERT (get_jack_command_line_string (options, command_line)); - - cout << "Calling start_jack_server with command line: " << command_line << endl; - - CPPUNIT_ASSERT (start_jack_server (command_line)); - - // sleep for 10 seconds - Sleep (10*1000); - - CPPUNIT_ASSERT (jack_server_running ()); -#endif -} diff --git a/libs/ardour/test/jack_utils_test.h b/libs/ardour/test/jack_utils_test.h index 6a42d1d015..08fad2fc36 100644 --- a/libs/ardour/test/jack_utils_test.h +++ b/libs/ardour/test/jack_utils_test.h @@ -15,7 +15,6 @@ class JackUtilsTest : public CppUnit::TestFixture CPPUNIT_TEST (test_server_paths); CPPUNIT_TEST (test_config); CPPUNIT_TEST (test_command_line); - CPPUNIT_TEST (test_start_server); CPPUNIT_TEST_SUITE_END (); public: @@ -29,5 +28,4 @@ public: void test_server_paths (); void test_config (); void test_command_line (); - void test_start_server (); }; |