13
0

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:
Robin Gareus 2016-11-13 16:34:27 +01:00
parent e0766e8f74
commit ec31741ee6
3 changed files with 16 additions and 2 deletions

View File

@ -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 ()

View File

@ -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 ()

View File

@ -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 ()