Hi,
In juce::AudioProcessor::setPlayConfigDetails, is it possible to add a virtual callback so that the plug-in can be informed that the i/o channel count has changed? (it is possible to check that inside of juce::AudioProcessor::processBlock, but we can’t assume that every DAW continuously calls the process callback). Here is an example diff:
[code]Index: modules/juce_audio_processors/processors/juce_AudioProcessor.cpp
— modules/juce_audio_processors/processors/juce_AudioProcessor.cpp (revision XXXXX)
+++ modules/juce_audio_processors/processors/juce_AudioProcessor.cpp (working copy)
@@ -70,10 +70,15 @@
const double sampleRate_,
const int blockSize_) noexcept
{
-
numInputChannels = numIns;bool lIOHasChanged = (numInputChannels != numIns || numOutputChannels != numOuts);
numOutputChannels = numOuts;
sampleRate = sampleRate_;
blockSize = blockSize_; -
if (lIOHasChanged)
-
{
-
IOChanged();
-
}
}
void AudioProcessor::setSpeakerArrangement (const String& inputs, const String& outputs)
Index: modules/juce_audio_processors/processors/juce_AudioProcessor.h
— modules/juce_audio_processors/processors/juce_AudioProcessor.h (revision XXXXX)
+++ modules/juce_audio_processors/processors/juce_AudioProcessor.h (working copy)
@@ -589,6 +589,8 @@
/** @internal */
void sendParamChangeMessageToListeners (int parameterIndex, float newValue);
-
virtual void IOChanged() {}
private:
Array <AudioProcessorListener*> listeners;
Component::SafePointer activeEditor;
[/code]
All the best