Towards fixing AU preset invalidation
authorRobin Gareus <robin@gareus.org>
Sat, 1 Dec 2018 23:26:57 +0000 (00:26 +0100)
committerRobin Gareus <robin@gareus.org>
Sat, 1 Dec 2018 23:26:57 +0000 (00:26 +0100)
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

index 73fd6bf94baca9cc67cb553911f8ab24bc094edc..e55d0c61c843c16bf638807d882674e4030f9dae 100644 (file)
@@ -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