MCPcopy Create free account
hub / github.com/audacity/audacity / SaveBlobToConfig

Method SaveBlobToConfig

libraries/lib-audio-unit/AudioUnitEffectBase.cpp:49–62  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

47#define PRESET_USER_PATH wxT("~/Library/Audio/Presets")
48
49TranslatableString 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//

Callers

nothing calls this directly

Calls 2

SetConfigFunction · 0.85
IsEmptyMethod · 0.45

Tested by

no test coverage detected