From 2ee2b8481c50782faa54c306267a5800f9d5ddee Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Thu, 28 Feb 2019 04:47:48 +0100 Subject: [PATCH] Copy state when replicating an AU plugin This is only used for plugin-analysis, AU plugins are otherwise not replicated, and variable-i/o is used instead --- libs/ardour/audio_unit.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libs/ardour/audio_unit.cc b/libs/ardour/audio_unit.cc index ad9a245ba6..9d79928bac 100644 --- a/libs/ardour/audio_unit.cc +++ b/libs/ardour/audio_unit.cc @@ -498,6 +498,11 @@ AUPlugin::AUPlugin (const AUPlugin& other) { init (); + + XMLNode root (other.state_node_name ()); + other.add_state (&root); + set_state (root, Stateful::loading_state_version); + for (size_t i = 0; i < descriptors.size(); ++i) { set_parameter (i, other.get_parameter (i)); }