copy VST state on copy construction
This fixes issues with replicate instances & plugin-analysis instances not using the same set of parameters.
This commit is contained in:
parent
e0766e8f74
commit
ec31741ee6
@ -58,7 +58,11 @@ LXVSTPlugin::LXVSTPlugin (const LXVSTPlugin &other)
|
||||
|
||||
_plugin = _state->plugin;
|
||||
|
||||
// Plugin::setup_controls ();
|
||||
XMLNode* root = new XMLNode (other.state_node_name ());
|
||||
LocaleGuard lg;
|
||||
other.add_state (root);
|
||||
set_state (*root, Stateful::loading_state_version);
|
||||
delete root;
|
||||
}
|
||||
|
||||
LXVSTPlugin::~LXVSTPlugin ()
|
||||
|
@ -58,7 +58,11 @@ MacVSTPlugin::MacVSTPlugin (const MacVSTPlugin &other)
|
||||
|
||||
_plugin = _state->plugin;
|
||||
|
||||
// Plugin::setup_controls ();
|
||||
XMLNode* root = new XMLNode (other.state_node_name ());
|
||||
LocaleGuard lg;
|
||||
other.add_state (root);
|
||||
set_state (*root, Stateful::loading_state_version);
|
||||
delete root;
|
||||
}
|
||||
|
||||
MacVSTPlugin::~MacVSTPlugin ()
|
||||
|
@ -56,6 +56,12 @@ WindowsVSTPlugin::WindowsVSTPlugin (const WindowsVSTPlugin &other)
|
||||
Session::vst_current_loading_id = 0;
|
||||
|
||||
_plugin = _state->plugin;
|
||||
|
||||
XMLNode* root = new XMLNode (other.state_node_name ());
|
||||
LocaleGuard lg;
|
||||
other.add_state (root);
|
||||
set_state (*root, Stateful::loading_state_version);
|
||||
delete root;
|
||||
}
|
||||
|
||||
WindowsVSTPlugin::~WindowsVSTPlugin ()
|
||||
|
Loading…
Reference in New Issue
Block a user