Browse Source

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

tags/2021-05-28
hogliux 8 years ago
parent
commit
ecacee031d
3 changed files with 22 additions and 2 deletions
  1. +10
    -2
      modules/juce_audio_plugin_client/AAX/juce_AAX_Wrapper.cpp
  2. +3
    -0
      modules/juce_audio_processors/processors/juce_AudioProcessor.cpp
  3. +9
    -0
      modules/juce_audio_processors/processors/juce_AudioProcessor.h

+ 10
- 2
modules/juce_audio_plugin_client/AAX/juce_AAX_Wrapper.cpp 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);


+ 3
- 0
modules/juce_audio_processors/processors/juce_AudioProcessor.cpp View File

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


+ 9
- 0
modules/juce_audio_processors/processors/juce_AudioProcessor.h 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.


Loading…
Cancel
Save