From 16da5419d3ee52ddfbd99c5efcbf878c2c21c7ae Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Tue, 10 Aug 2021 15:54:37 +0200 Subject: [PATCH] Do not implicitly modify VST support config parameters --- gtk2_ardour/canvas_test.cc | 2 +- gtk2_ardour/main.cc | 2 +- gtk2_ardour/toolbar_test.cc | 2 +- headless/load_session.cc | 12 ++---------- libs/ardour/ardour/ardour.h | 3 +-- libs/ardour/globals.cc | 7 +------ libs/ardour/test/load_save_session.cc | 2 +- libs/ardour/test/profiling/load_session.cc | 2 +- libs/ardour/test/profiling/lots_of_regions.cc | 2 +- libs/ardour/test/profiling/runpc.cc | 2 +- libs/ardour/test/test_ui.cc | 5 ----- libs/ardour/test/testrunner.cc | 2 +- luasession/luasession.cc | 2 +- session_utils/common.cc | 2 +- 14 files changed, 14 insertions(+), 33 deletions(-) diff --git a/gtk2_ardour/canvas_test.cc b/gtk2_ardour/canvas_test.cc index 3b7a8875b5..511d9caf06 100644 --- a/gtk2_ardour/canvas_test.cc +++ b/gtk2_ardour/canvas_test.cc @@ -257,7 +257,7 @@ int main (int argc, char **argv) // TODO setlocale.. #endif - if (!ARDOUR::init (false, true, localedir)) { + if (!ARDOUR::init (true, localedir)) { cerr << "Ardour failed to initialize\n" << endl; ::exit (EXIT_FAILURE); } diff --git a/gtk2_ardour/main.cc b/gtk2_ardour/main.cc index 37828482e7..0bd7b3aa97 100644 --- a/gtk2_ardour/main.cc +++ b/gtk2_ardour/main.cc @@ -383,7 +383,7 @@ int main (int argc, char *argv[]) SetErrorMode (prev_error_mode); #endif - if (!ARDOUR::init (ARDOUR_COMMAND_LINE::use_vst, ARDOUR_COMMAND_LINE::try_hw_optimization, localedir.c_str(), true)) { + if (!ARDOUR::init (ARDOUR_COMMAND_LINE::try_hw_optimization, localedir.c_str(), true)) { error << string_compose (_("could not initialize %1."), PROGRAM_NAME) << endmsg; Gtk::Main main (argc, argv); Gtk::MessageDialog msg (string_compose (_("Could not initialize %1 (likely due to corrupt config files).\n" diff --git a/gtk2_ardour/toolbar_test.cc b/gtk2_ardour/toolbar_test.cc index 2b85acdf43..81f3f91b3b 100644 --- a/gtk2_ardour/toolbar_test.cc +++ b/gtk2_ardour/toolbar_test.cc @@ -267,7 +267,7 @@ int main (int argc, char **argv) // TODO setlocale.. #endif - if (!ARDOUR::init (false, true, localedir)) { + if (!ARDOUR::init (true, localedir)) { cerr << "Ardour failed to initialize\n" << endl; ::exit (EXIT_FAILURE); } diff --git a/headless/load_session.cc b/headless/load_session.cc index 10971ce25a..e03e86134d 100644 --- a/headless/load_session.cc +++ b/headless/load_session.cc @@ -149,7 +149,7 @@ print_help () int main (int argc, char* argv[]) { - const char* optstring = "vhBdD:c:VOU:P"; + const char* optstring = "vhBdD:c:OU:P"; /* clang-format off */ const struct option longopts[] = { @@ -159,14 +159,12 @@ main (int argc, char* argv[]) { "disable-plugins", no_argument, 0, 'd' }, { "debug", required_argument, 0, 'D' }, { "name", required_argument, 0, 'c' }, - { "novst", no_argument, 0, 'V' }, { "no-hw-optimizations", no_argument, 0, 'O' }, { "no-connect-ports", no_argument, 0, 'P' }, { 0, 0, 0, 0 } }; /* clang-format on */ - bool use_vst = true; bool try_hw_optimization = true; backend_client_name = PBD::downcase (std::string (PROGRAM_NAME)); @@ -213,12 +211,6 @@ main (int argc, char* argv[]) ARDOUR::Port::set_connecting_blocked (true); break; - case 'V': -#ifdef WINDOWS_VST_SUPPORT - use_vst = false; -#endif /* WINDOWS_VST_SUPPORT */ - break; - default: print_help (); exit (EXIT_FAILURE); @@ -230,7 +222,7 @@ main (int argc, char* argv[]) exit (EXIT_FAILURE); } - if (!ARDOUR::init (use_vst, try_hw_optimization, localedir)) { + if (!ARDOUR::init (try_hw_optimization, localedir)) { cerr << "Ardour failed to initialize\n" << endl; exit (EXIT_FAILURE); diff --git a/libs/ardour/ardour/ardour.h b/libs/ardour/ardour/ardour.h index 9f20a466b3..182435a5ef 100644 --- a/libs/ardour/ardour/ardour.h +++ b/libs/ardour/ardour/ardour.h @@ -59,7 +59,6 @@ namespace ARDOUR { extern LIBARDOUR_API std::map reserved_io_names; /** - * @param with_vst true to enable VST Support * @param try_optimization true to enable hardware optimized routines * for mixing, finding peak values etc. * @param localedir Directory to look for localisation files @@ -68,7 +67,7 @@ namespace ARDOUR { * * @return true if Ardour library was successfully initialized */ - LIBARDOUR_API bool init (bool with_vst, bool try_optimization, const char* localedir, bool with_gui = false); + LIBARDOUR_API bool init (bool try_optimization, const char* localedir, bool with_gui = false); LIBARDOUR_API void init_post_engine (uint32_t); LIBARDOUR_API void cleanup (); LIBARDOUR_API bool no_auto_connect (); diff --git a/libs/ardour/globals.cc b/libs/ardour/globals.cc index 2ff3867c64..facee2f95f 100644 --- a/libs/ardour/globals.cc +++ b/libs/ardour/globals.cc @@ -518,7 +518,7 @@ ARDOUR::handle_old_configuration_files (boost::functionset_use_windows_vst (use_windows_vst); -#ifdef LXVST_SUPPORT - Config->set_use_lxvst (true); -#endif - Profile = new RuntimeProfile; #ifdef WINDOWS_VST_SUPPORT diff --git a/libs/ardour/test/load_save_session.cc b/libs/ardour/test/load_save_session.cc index ab4573c883..57578bff82 100644 --- a/libs/ardour/test/load_save_session.cc +++ b/libs/ardour/test/load_save_session.cc @@ -44,7 +44,7 @@ int main (int argc, char* argv[]) PBD::Timing ardour_init_timing; - ARDOUR::init (false, true, localedir); + ARDOUR::init (true, localedir); ardour_init_timing.update(); TestUI* test_ui = new TestUI(); diff --git a/libs/ardour/test/profiling/load_session.cc b/libs/ardour/test/profiling/load_session.cc index 1a673762c0..bed795e85f 100644 --- a/libs/ardour/test/profiling/load_session.cc +++ b/libs/ardour/test/profiling/load_session.cc @@ -19,7 +19,7 @@ int main (int argc, char* argv[]) exit (EXIT_FAILURE); } - ARDOUR::init (false, true, localedir); + ARDOUR::init (true, localedir); TestUI* test_ui = new TestUI(); create_and_start_dummy_backend (); diff --git a/libs/ardour/test/profiling/lots_of_regions.cc b/libs/ardour/test/profiling/lots_of_regions.cc index 47c8376b79..e50cb97aaa 100644 --- a/libs/ardour/test/profiling/lots_of_regions.cc +++ b/libs/ardour/test/profiling/lots_of_regions.cc @@ -16,7 +16,7 @@ static const char* localedir = LOCALEDIR; int main (int argc, char* argv[]) { - ARDOUR::init (false, true, localedir); + ARDOUR::init (true, localedir); TestUI* test_ui = new TestUI(); create_and_start_dummy_backend (); Session* session = load_session ("../libs/ardour/test/profiling/sessions/1region", "1region"); diff --git a/libs/ardour/test/profiling/runpc.cc b/libs/ardour/test/profiling/runpc.cc index 8bf054653e..b475a8a5dc 100644 --- a/libs/ardour/test/profiling/runpc.cc +++ b/libs/ardour/test/profiling/runpc.cc @@ -21,7 +21,7 @@ main (int argc, char* argv[]) exit (EXIT_FAILURE); } - ARDOUR::init (false, true, localedir); + ARDOUR::init (true, localedir); TestUI* test_ui = new TestUI(); create_and_start_dummy_backend (); diff --git a/libs/ardour/test/test_ui.cc b/libs/ardour/test/test_ui.cc index 5d15fdf2d8..30687cd433 100644 --- a/libs/ardour/test/test_ui.cc +++ b/libs/ardour/test/test_ui.cc @@ -46,11 +46,6 @@ TestUI::TestUI () m_test_receiver.listen_to (PBD::warning); m_test_receiver.listen_to (PBD::error); m_test_receiver.listen_to (PBD::fatal); - - /* We can't use VSTs here as we have a stub instead of the - required bits in gtk2_ardour. - */ - Config->set_use_lxvst (false); } TestUI::~TestUI () diff --git a/libs/ardour/test/testrunner.cc b/libs/ardour/test/testrunner.cc index ddb320e02b..bff2268d50 100644 --- a/libs/ardour/test/testrunner.cc +++ b/libs/ardour/test/testrunner.cc @@ -49,7 +49,7 @@ main(int argc, char* argv[]) } } - CPPUNIT_ASSERT (ARDOUR::init (false, true, localedir)); + CPPUNIT_ASSERT (ARDOUR::init (true, localedir)); TestUI* test_ui = new TestUI(); diff --git a/luasession/luasession.cc b/luasession/luasession.cc index b1e611a725..50e1f34cb3 100644 --- a/luasession/luasession.cc +++ b/luasession/luasession.cc @@ -144,7 +144,7 @@ static MyEventLoop* event_loop = NULL; static void init () { - if (!ARDOUR::init (false, true, localedir)) { + if (!ARDOUR::init (true, localedir)) { cerr << "Ardour failed to initialize\n" << endl; console_madness_end (); ::exit (EXIT_FAILURE); diff --git a/session_utils/common.cc b/session_utils/common.cc index 4b87cbfb81..1345cee063 100644 --- a/session_utils/common.cc +++ b/session_utils/common.cc @@ -114,7 +114,7 @@ static MyEventLoop *event_loop; void SessionUtils::init (bool print_log) { - if (!ARDOUR::init (false, true, localedir)) { + if (!ARDOUR::init (true, localedir)) { cerr << "Ardour failed to initialize\n" << endl; ::exit (EXIT_FAILURE); }