Browse Source

LV2 Host: Avoid removing anchors from plugin URIs when loading editors

v7.0.9
reuk 2 years ago
parent
commit
242e93e41e
1 changed files with 6 additions and 13 deletions
  1. +6
    -13
      modules/juce_audio_processors/format_types/juce_LV2PluginFormat.cpp

+ 6
- 13
modules/juce_audio_processors/format_types/juce_LV2PluginFormat.cpp View File

@@ -2579,15 +2579,8 @@ public:
File bundlePath;
URL pluginUri;
auto withBundlePath (File v) const noexcept { return with (&UiInstanceArgs::bundlePath, std::move (v)); }
auto withPluginUri (URL v) const noexcept { return with (&UiInstanceArgs::pluginUri, std::move (v)); }
private:
template <typename Member>
UiInstanceArgs with (Member UiInstanceArgs::* member, Member value) const noexcept
{
return juce::lv2_host::with (*this, member, std::move (value));
}
auto withBundlePath (File v) const noexcept { return withMember (*this, &UiInstanceArgs::bundlePath, std::move (v)); }
auto withPluginUri (URL v) const noexcept { return withMember (*this, &UiInstanceArgs::pluginUri, std::move (v)); }
};
static File bundlePathFromUri (const char* uri)
@@ -2614,7 +2607,7 @@ public:
mLV2_UI__floatProtocol (map.map (LV2_UI__floatProtocol)),
mLV2_ATOM__atomTransfer (map.map (LV2_ATOM__atomTransfer)),
mLV2_ATOM__eventTransfer (map.map (LV2_ATOM__eventTransfer)),
instance (makeInstance (args.pluginUri, args.bundlePath, features)),
instance (makeInstance (args, features)),
idleCallback (getExtensionData<LV2UI_Idle_Interface> (world, LV2_UI__idleInterface))
{
jassert (descriptor != nullptr);
@@ -2682,14 +2675,14 @@ private:
using Instance = std::unique_ptr<void, void (*) (LV2UI_Handle)>;
using Idle = int (*) (LV2UI_Handle);
Instance makeInstance (const URL& pluginUri, const File& bundlePath, const LV2_Feature* const* features)
Instance makeInstance (const UiInstanceArgs& args, const LV2_Feature* const* features)
{
if (descriptor->get() == nullptr)
return { nullptr, [] (LV2UI_Handle) {} };
return Instance { descriptor->get()->instantiate (descriptor->get(),
pluginUri.toString (false).toRawUTF8(),
File::addTrailingSeparator (bundlePath.getFullPathName()).toRawUTF8(),
args.pluginUri.toString (true).toRawUTF8(),
File::addTrailingSeparator (args.bundlePath.getFullPathName()).toRawUTF8(),
writeFunction,
this,
&widget,


Loading…
Cancel
Save