re-add sanitize_node function to mixer_snapshot.h and add check + removal for plugins recall flag

This commit is contained in:
Nikolaus Gullotta 2019-06-03 15:43:40 -05:00 committed by Nikolaus Gullotta
parent edfcd57590
commit 92d81f5f54
No known key found for this signature in database
GPG key ID: 565F60578092AA31
2 changed files with 12 additions and 0 deletions

View file

@ -116,6 +116,7 @@ class LIBARDOUR_API MixerSnapshot
private:
ARDOUR::Session* _session;
XMLNode& sanitize_node(XMLNode&);
void reassign_masters(boost::shared_ptr<ARDOUR::Slavable>, XMLNode);
void load_from_session(std::string);
void load_from_session(XMLNode&);

View file

@ -572,3 +572,14 @@ void MixerSnapshot::load_from_session(XMLNode& node)
}
}
}
XMLNode& MixerSnapshot::sanitize_node(XMLNode& node)
{
if(!get_recall_plugins()) {
vector<string> types {"lv2", "windows-vst", "lxvst", "mac-vst", "audiounit", "luaproc"};
for(vector<string>::iterator it = types.begin(); it != types.end(); it++) {
node.remove_nodes_and_delete(X_("type"), (*it));
}
}
return node;
}