mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
AudioUnit hosting name fix.
This commit is contained in:
parent
5d353d4dec
commit
c0094bd986
1 changed files with 19 additions and 4 deletions
|
|
@ -120,15 +120,14 @@ namespace AudioUnitFormatHelpers
|
|||
DBG ("AU name: " + name);
|
||||
}
|
||||
|
||||
if (name.isNotEmpty())
|
||||
if (name.containsChar (':'))
|
||||
{
|
||||
manufacturer = name.upToFirstOccurrenceOf (":", false, false).trim();
|
||||
name = name.fromFirstOccurrenceOf (":", false, false).trim();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
if (name.isEmpty())
|
||||
name = "<Unknown>";
|
||||
}
|
||||
}
|
||||
|
||||
bool getComponentDescFromIdentifier (const String& fileOrIdentifier, AudioComponentDescription& desc,
|
||||
|
|
@ -153,6 +152,22 @@ namespace AudioUnitFormatHelpers
|
|||
if (AudioComponent comp = AudioComponentFindNext (0, &desc))
|
||||
{
|
||||
getNameAndManufacturer (comp, name, manufacturer);
|
||||
|
||||
if (manufacturer.isEmpty())
|
||||
manufacturer = tokens[2];
|
||||
|
||||
if (version.isEmpty())
|
||||
{
|
||||
UInt32 versionNum;
|
||||
|
||||
if (AudioComponentGetVersion (comp, &versionNum) == noErr)
|
||||
{
|
||||
version << (int) (versionNum >> 16) << "."
|
||||
<< (int) ((versionNum >> 8) & 0xff) << "."
|
||||
<< (int) (versionNum & 0xff);
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue