mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
AudioUnit: name CFString release fixes.
This commit is contained in:
parent
3f6714ea7d
commit
d5df89190c
2 changed files with 8 additions and 3 deletions
|
|
@ -402,9 +402,7 @@ public:
|
|||
if (juceFilter->isMetaParameter (index))
|
||||
outParameterInfo.flags |= kAudioUnitParameterFlag_IsGlobalMeta;
|
||||
|
||||
CFStringRef cfName (name.toCFString());
|
||||
AUBase::FillInParameterName (outParameterInfo, cfName, false);
|
||||
CFRelease (cfName);
|
||||
AUBase::FillInParameterName (outParameterInfo, name.toCFString(), true);
|
||||
|
||||
outParameterInfo.minValue = 0.0f;
|
||||
outParameterInfo.maxValue = 1.0f;
|
||||
|
|
|
|||
|
|
@ -610,9 +610,16 @@ public:
|
|||
parameterIds [index], &info, &sz) == noErr)
|
||||
{
|
||||
if ((info.flags & kAudioUnitParameterFlag_HasCFNameString) != 0)
|
||||
{
|
||||
name = String::fromCFString (info.cfNameString);
|
||||
|
||||
if ((info.flags & kAudioUnitParameterFlag_CFNameRelease) != 0)
|
||||
CFRelease (info.cfNameString);
|
||||
}
|
||||
else
|
||||
{
|
||||
name = String (info.name, sizeof (info.name));
|
||||
}
|
||||
}
|
||||
|
||||
return name;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue