1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-11 23:54:18 +00:00

AudioProcessor: Added optional getAlternateDisplayNames callback to be able specify shorter names for your AudioProcessor

This commit is contained in:
hogliux 2017-06-02 11:31:57 +01:00
parent 7663c4a045
commit ecacee031d
3 changed files with 22 additions and 2 deletions

View file

@ -1870,8 +1870,16 @@ namespace AAXClasses
const int numInputBuses = plugin->getBusCount (true);
const int numOutputBuses = plugin->getBusCount (false);
descriptor.AddName (JucePlugin_Desc);
descriptor.AddName (JucePlugin_Name);
auto pluginNames = plugin->getAlternateDisplayNames();
pluginNames.insert (0, JucePlugin_Desc);
pluginNames.insert (0, JucePlugin_Name);
pluginNames.removeDuplicates (false);
for (auto name : pluginNames)
descriptor.AddName (name.toRawUTF8());
descriptor.AddCategory (JucePlugin_AAXCategory);
const int numMeters = addAAXMeters (*plugin, descriptor);

View file

@ -87,6 +87,9 @@ AudioProcessor::~AudioProcessor()
#endif
}
//==============================================================================
StringArray AudioProcessor::getAlternateDisplayNames() const { return StringArray (getName()); }
//==============================================================================
bool AudioProcessor::addBus (bool isInput)
{

View file

@ -96,6 +96,15 @@ public:
/** Returns the name of this processor. */
virtual const String getName() const = 0;
/** Returns a list of alternative names to use for this processor.
Some hosts truncate the name of your AudioProcessor when there isn't enough
space in the GUI to show the full name. Overriding this method, allows the host
to choose an alternative name (such as an abbreviation) to better fit the
available space.
*/
virtual StringArray getAlternateDisplayNames() const;
//==============================================================================
/** Called before playback starts, to let the filter prepare itself.