| 47 | #define PRESET_USER_PATH wxT("~/Library/Audio/Presets") |
| 48 | |
| 49 | TranslatableString AudioUnitEffectBase::SaveBlobToConfig( |
| 50 | const RegistryPath &group, const wxString &path, |
| 51 | const void *blob, size_t len, bool allowEmpty) const |
| 52 | { |
| 53 | // Base64 encode the returned binary property list |
| 54 | auto parms = wxBase64Encode(blob, len); |
| 55 | if (!allowEmpty && parms.IsEmpty()) |
| 56 | return XO("Failed to encode preset from \"%s\"").Format(path); |
| 57 | |
| 58 | // And write it to the config |
| 59 | if (!SetConfig(*this, PluginSettings::Private, group, PRESET_KEY, parms)) |
| 60 | return XO("Unable to store preset in config file"); |
| 61 | return {}; |
| 62 | } |
| 63 | |
| 64 | /////////////////////////////////////////////////////////////////////////////// |
| 65 | // |