From 3a0ab9f42a70a0fdc7585328a13405ca9206abde Mon Sep 17 00:00:00 2001 From: Tom Poole Date: Wed, 9 May 2018 11:03:31 +0100 Subject: [PATCH] Added a comment to clarify the behaviour of hosted parameter IDs --- .../processors/juce_AudioPluginInstance.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/modules/juce_audio_processors/processors/juce_AudioPluginInstance.cpp b/modules/juce_audio_processors/processors/juce_AudioPluginInstance.cpp index b8e3adc934..a228766bd5 100644 --- a/modules/juce_audio_processors/processors/juce_AudioPluginInstance.cpp +++ b/modules/juce_audio_processors/processors/juce_AudioPluginInstance.cpp @@ -38,6 +38,15 @@ String AudioPluginInstance::getParameterID (int parameterIndex) { assertOnceOnDeprecatedMethodUse(); + // Currently there is no corresponding method available in the + // AudioProcessorParameter class, and the previous behaviour of JUCE's + // plug-in hosting code simply returns a string version of the index; to + // maintain backwards compatibilty you should perform the operation below + // this comment. However the caveat is that for plug-ins which change their + // number of parameters dynamically at runtime you cannot rely upon the + // returned parameter ID mapping to the correct parameter. A comprehensive + // solution to this problem requires some additional work in JUCE's hosting + // code. return String (parameterIndex); }