1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Fix for auval fail with parameter strings in plugins with old-style parameter implementations.

This commit is contained in:
jules 2015-01-10 15:32:29 +00:00
parent c19df0cc20
commit c1dbb8684a

View file

@ -343,11 +343,14 @@ public:
{
if (juceFilter != nullptr)
{
const String text (String::fromCFString (pv->inString));
if (AudioProcessorParameter* param = juceFilter->getParameters() [(int) pv->inParamID])
{
pv->outValue = param->getValueForText (String::fromCFString (pv->inString));
return noErr;
}
pv->outValue = param->getValueForText (text);
else
pv->outValue = text.getFloatValue();
return noErr;
}
}
}
@ -359,11 +362,16 @@ public:
{
if (juceFilter != nullptr)
{
const float value = (float) *(pv->inValue);
String text;
if (AudioProcessorParameter* param = juceFilter->getParameters() [(int) pv->inParamID])
{
pv->outString = param->getText ((float) *(pv->inValue), 0).toCFString();
return noErr;
}
text = param->getText ((float) *(pv->inValue), 0);
else
text = String (value);
pv->outString = text.toCFString();
return noErr;
}
}
}