diff --git a/modules/chowdsp_utils b/modules/chowdsp_utils index c0f2826..dfd267c 160000 --- a/modules/chowdsp_utils +++ b/modules/chowdsp_utils @@ -1 +1 @@ -Subproject commit c0f282652add2021d3663c0782a6a65314d6acfd +Subproject commit dfd267c3c8696a6628e5b60f81e5c5182702536b diff --git a/modules/clap-juce-extensions b/modules/clap-juce-extensions index f417137..e72d59a 160000 --- a/modules/clap-juce-extensions +++ b/modules/clap-juce-extensions @@ -1 +1 @@ -Subproject commit f417137a5132dfe9274a926a4f21dfc56e363d5d +Subproject commit e72d59a870ab6dea156d4912cbd004b715fca5f7 diff --git a/src/ChowMultiTool.cpp b/src/ChowMultiTool.cpp index 8924562..e52d7a1 100644 --- a/src/ChowMultiTool.cpp +++ b/src/ChowMultiTool.cpp @@ -16,6 +16,16 @@ ChowMultiTool::ChowMultiTool() : chowdsp::PluginBase (&undoManager, creat presetManager = std::make_unique (*this); programAdaptor = std::make_unique (presetManager); + +#if HAS_CLAP_JUCE_EXTENSIONS + presetManager->clapPresetLoadedBroadcaster.connect ( + [this] (uint32_t location_kind, + const char* location, + const char* load_key) + { + reportPresetLoaded (location_kind, location, load_key); + }); +#endif } juce::AudioProcessor::BusesProperties ChowMultiTool::createBusLayout() @@ -100,7 +110,8 @@ static const clap_preset_discovery_factory chowmultitool_preset_discovery_factor const void* JUCE_CALLTYPE clapJuceExtensionCustomFactory (const char* factory_id) { - if (strcmp (factory_id, CLAP_PRESET_DISCOVERY_FACTORY_ID) == 0) + if (strcmp (factory_id, CLAP_PRESET_DISCOVERY_FACTORY_ID) == 0 + || strcmp (factory_id, CLAP_PRESET_DISCOVERY_FACTORY_ID_COMPAT) == 0) { return &chowmultitool_preset_discovery_factory; } diff --git a/src/state/presets/PresetDiscovery.cpp b/src/state/presets/PresetDiscovery.cpp index 051c6ff..e211728 100644 --- a/src/state/presets/PresetDiscovery.cpp +++ b/src/state/presets/PresetDiscovery.cpp @@ -5,7 +5,7 @@ namespace state::presets::discovery { -static constexpr clap_plugin_id plugin_id { +static constexpr clap_universal_plugin_id plugin_id { .abi = "clap", .id = CHOWMULTITOOL_CLAP_ID, }; @@ -35,7 +35,7 @@ struct FactoryPresetsProvider : chowdsp::presets::discovery::EmbeddedPresetsProv static constexpr clap_preset_discovery_location factoryPresetsLocation { .flags = CLAP_PRESET_DISCOVERY_IS_FACTORY_CONTENT, - .name = "ChowMultiTool Factory Presets Location", + .name = "ChowMultiTool Factory Presets", .kind = CLAP_PRESET_DISCOVERY_LOCATION_PLUGIN, .location = nullptr, }; @@ -57,7 +57,7 @@ struct UserPresetsProvider : chowdsp::presets::discovery::FilePresetsProvider static constexpr clap_preset_discovery_provider_descriptor descriptor { .clap_version = CLAP_VERSION_INIT, .id = "org.chowdsp.ChowMultiTool.user-presets", - .name = "ChowMultiTool User Presets Provider", + .name = "ChowMultiTool User Presets", .vendor = "User" };