From 3c7dea43af9d9e5b2563aee81ac5253fb2ee7858 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Sun, 2 Dec 2018 00:26:57 +0100 Subject: [PATCH] Towards fixing AU preset invalidation This is a step in the right direction: first load the preset and only if preset-loading was successful mark it as loaded. This still does not properly unset "parameter_changed_since_last_preset". AU signals "kAudioUnitEvent_ParameterValueChange" later in the event-loop. --- libs/ardour/audio_unit.cc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/libs/ardour/audio_unit.cc b/libs/ardour/audio_unit.cc index 73fd6bf94b..e55d0c61c8 100644 --- a/libs/ardour/audio_unit.cc +++ b/libs/ardour/audio_unit.cc @@ -2170,8 +2170,6 @@ AUPlugin::set_state(const XMLNode& node, int version) bool AUPlugin::load_preset (PresetRecord r) { - Plugin::load_preset (r); - bool ret = false; CFPropertyListRef propertyList; Glib::ustring path; @@ -2218,7 +2216,7 @@ AUPlugin::load_preset (PresetRecord r) } } - return ret; + return ret && Plugin::load_preset (r); } void