From a8c2585cdc109e92128daab464a5e6a937937f77 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Fri, 30 Jun 2023 12:58:43 -0600 Subject: [PATCH] remove AudioEngine::destroy() calls from various test/util code ARDOUR::cleanup() does this, and the engine must exist during port deregistration. --- headless/load_session.cc | 2 +- libs/ardour/test/audio_engine_test.cc | 4 ---- libs/ardour/test/load_save_session.cc | 2 -- libs/ardour/test/profiling/load_session.cc | 1 - libs/ardour/test/test_util.cc | 1 - luasession/luasession.cc | 1 - 6 files changed, 1 insertion(+), 10 deletions(-) diff --git a/headless/load_session.cc b/headless/load_session.cc index e03e86134d..d1f4c4d85f 100644 --- a/headless/load_session.cc +++ b/headless/load_session.cc @@ -275,6 +275,6 @@ main (int argc, char* argv[]) delete s; AudioEngine::instance ()->stop (); - AudioEngine::destroy (); + ARDOUR::cleanup (); return 0; } diff --git a/libs/ardour/test/audio_engine_test.cc b/libs/ardour/test/audio_engine_test.cc index 125b93cb50..91701364bc 100644 --- a/libs/ardour/test/audio_engine_test.cc +++ b/libs/ardour/test/audio_engine_test.cc @@ -36,8 +36,6 @@ AudioEngineTest::test_backends () i != backends.end(); ++i) { print_audio_backend_info(*i); } - - AudioEngine::destroy (); } void @@ -56,6 +54,4 @@ AudioEngineTest::test_start () Glib::usleep(2000); CPPUNIT_ASSERT (engine->stop () == 0); - - AudioEngine::destroy (); } diff --git a/libs/ardour/test/load_save_session.cc b/libs/ardour/test/load_save_session.cc index 57578bff82..0b352b9e33 100644 --- a/libs/ardour/test/load_save_session.cc +++ b/libs/ardour/test/load_save_session.cc @@ -111,8 +111,6 @@ int main (int argc, char* argv[]) AudioEngine::instance()->stop (); - AudioEngine::destroy (); - delete test_ui; ARDOUR::cleanup (); diff --git a/libs/ardour/test/profiling/load_session.cc b/libs/ardour/test/profiling/load_session.cc index bed795e85f..2e823a34f3 100644 --- a/libs/ardour/test/profiling/load_session.cc +++ b/libs/ardour/test/profiling/load_session.cc @@ -44,7 +44,6 @@ int main (int argc, char* argv[]) AudioEngine::instance()->remove_session (); delete s; AudioEngine::instance()->stop (); - AudioEngine::destroy (); delete test_ui; ARDOUR::cleanup (); return 0; diff --git a/libs/ardour/test/test_util.cc b/libs/ardour/test/test_util.cc index 7c2cfcf020..9f39198009 100644 --- a/libs/ardour/test/test_util.cc +++ b/libs/ardour/test/test_util.cc @@ -116,7 +116,6 @@ stop_and_destroy_backend () { AudioEngine::instance()->remove_session (); AudioEngine::instance()->stop (); - AudioEngine::destroy (); } /** @param dir Session directory. diff --git a/luasession/luasession.cc b/luasession/luasession.cc index cceb2fbc25..2dee838073 100644 --- a/luasession/luasession.cc +++ b/luasession/luasession.cc @@ -648,7 +648,6 @@ main (int argc, char** argv) lua = NULL; AudioEngine::instance ()->stop (); - AudioEngine::destroy (); ARDOUR::cleanup (); delete event_loop;