diff --git a/modules/juce_audio_plugin_client/LV2/juce_LV2_Client.cpp b/modules/juce_audio_plugin_client/LV2/juce_LV2_Client.cpp index 0135ddde81..8ad8b9580f 100644 --- a/modules/juce_audio_plugin_client/LV2/juce_LV2_Client.cpp +++ b/modules/juce_audio_plugin_client/LV2/juce_LV2_Client.cpp @@ -961,6 +961,7 @@ private: "@prefix pprop: .\n" "@prefix rdfs: .\n" "@prefix rdf: .\n" + "@prefix rsz: .\n" "@prefix state: .\n" "@prefix time: .\n" "@prefix ui: .\n" @@ -1202,7 +1203,15 @@ private: } } + // In the event that the plugin decides to send all of its parameters in one go, + // we should ensure that the output buffer is large enough to accommodate, with some + // extra room for the sequence header, MIDI messages etc.. + const auto patchSetSizeBytes = 72; + const auto additionalSize = 8192; + const auto atomPortMinSize = proc.getParameters().size() * patchSetSizeBytes + additionalSize; + os << "\t\ta lv2:InputPort , atom:AtomPort ;\n" + "\t\trsz:minimumSize " << atomPortMinSize << " ;\n" "\t\tatom:bufferType atom:Sequence ;\n" "\t\tatom:supports\n"; @@ -1219,6 +1228,7 @@ private: "\t\tlv2:name \"In\" ;\n" "\t] , [\n" "\t\ta lv2:OutputPort , atom:AtomPort ;\n" + "\t\trsz:minimumSize " << atomPortMinSize << " ;\n" "\t\tatom:bufferType atom:Sequence ;\n" "\t\tatom:supports\n";