Unload VST3 modules when closing session
This is perhaps a better solution thanb8551eed7e
and8d0a655608
and7942897d93
. It is certainly less fragile. It is more consistent with other plugin standards, where modules are closed with the last instance in a session. Then again keeping the VST3 factory around is beneficial when switching snapshots. Discuss, and let's watch for issues when re-loading a previously unloaded VST3 module.
This commit is contained in:
parent
b8551eed7e
commit
cd5369c7cd
@ -134,6 +134,7 @@
|
|||||||
#include "ardour/utils.h"
|
#include "ardour/utils.h"
|
||||||
#include "ardour/vca_manager.h"
|
#include "ardour/vca_manager.h"
|
||||||
#include "ardour/vca.h"
|
#include "ardour/vca.h"
|
||||||
|
#include "ardour/vst3_plugin.h"
|
||||||
|
|
||||||
#include "midi++/port.h"
|
#include "midi++/port.h"
|
||||||
#include "midi++/mmc.h"
|
#include "midi++/mmc.h"
|
||||||
@ -864,6 +865,11 @@ Session::destroy ()
|
|||||||
|
|
||||||
_transport_fsm->stop ();
|
_transport_fsm->stop ();
|
||||||
|
|
||||||
|
/* close VST3 Modules */
|
||||||
|
for (auto const& nfo : PluginManager::instance().vst3_plugin_info()) {
|
||||||
|
std::dynamic_pointer_cast<VST3PluginInfo> (nfo)->m.reset ();
|
||||||
|
}
|
||||||
|
|
||||||
DEBUG_TRACE (DEBUG::Destruction, "Session::destroy() done\n");
|
DEBUG_TRACE (DEBUG::Destruction, "Session::destroy() done\n");
|
||||||
|
|
||||||
#ifndef NDEBUG
|
#ifndef NDEBUG
|
||||||
|
Loading…
Reference in New Issue
Block a user