Browse Source

Passed maximum name length when calling VST getParameterName().

tags/2021-05-28
jules 12 years ago
parent
commit
53cbc74986
2 changed files with 3 additions and 3 deletions
  1. +1
    -1
      modules/juce_audio_plugin_client/RTAS/juce_RTAS_Wrapper.cpp
  2. +2
    -2
      modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp

+ 1
- 1
modules/juce_audio_plugin_client/RTAS/juce_RTAS_Wrapper.cpp View File

@@ -861,7 +861,7 @@ private:
void GetNameOfLength (char* name, int maxLength, OSType inControllerType) const
{
// Pro-tools expects all your parameters to have valid names!
jassert (juceFilter->getParameterName (index).isNotEmpty());
jassert (juceFilter->getParameterName (index, maxLength).isNotEmpty());
juceFilter->getParameterName (index, maxLength).copyToUTF8 (name, (size_t) maxLength + 1);
}


+ 2
- 2
modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp View File

@@ -831,7 +831,7 @@ public:
if (filter != nullptr)
{
jassert (isPositiveAndBelow (index, filter->getNumParameters()));
filter->getParameterText (index).copyToUTF8 (text, 24); // length should technically be kVstMaxParamStrLen, which is 8, but hosts will normally allow a bit more.
filter->getParameterText (index, 24).copyToUTF8 (text, 24); // length should technically be kVstMaxParamStrLen, which is 8, but hosts will normally allow a bit more.
}
}
@@ -840,7 +840,7 @@ public:
if (filter != nullptr)
{
jassert (isPositiveAndBelow (index, filter->getNumParameters()));
filter->getParameterName (index).copyToUTF8 (text, 16); // length should technically be kVstMaxParamStrLen, which is 8, but hosts will normally allow a bit more.
filter->getParameterName (index, 16).copyToUTF8 (text, 16); // length should technically be kVstMaxParamStrLen, which is 8, but hosts will normally allow a bit more.
}
}


Loading…
Cancel
Save