From 9f9d86b91afc488d83a75657f2c5f5b19ef43e12 Mon Sep 17 00:00:00 2001 From: ed Date: Mon, 29 Apr 2019 15:48:29 +0100 Subject: [PATCH] Made AudioProcessor::applyBusLayouts() virtual --- .../processors/juce_AudioProcessor.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/modules/juce_audio_processors/processors/juce_AudioProcessor.h b/modules/juce_audio_processors/processors/juce_AudioProcessor.h index d1d27d5dcd..18f2ebecc6 100644 --- a/modules/juce_audio_processors/processors/juce_AudioProcessor.h +++ b/modules/juce_audio_processors/processors/juce_AudioProcessor.h @@ -1500,7 +1500,7 @@ protected: */ virtual bool isBusesLayoutSupported (const BusesLayout&) const { return true; } - /** Callback to check if a certain bus layout can now be applied + /** Callback to check if a certain bus layout can now be applied. Most subclasses will not need to override this method and should instead override the isBusesLayoutSupported callback to reject certain layout changes. @@ -1533,6 +1533,13 @@ protected: */ virtual bool canApplyBusesLayout (const BusesLayout& layouts) const { return isBusesLayoutSupported (layouts); } + /** This method will be called when a new bus layout needs to be applied. + + Most subclasses will not need to override this method and should just use the default + implementation. + */ + virtual bool applyBusLayouts (const BusesLayout& layouts); + //============================================================================== /** Structure used for AudioProcessor Callbacks */ struct BusProperties @@ -1678,7 +1685,6 @@ private: AudioProcessorListener* getListenerLocked (int) const noexcept; void updateSpeakerFormatStrings(); - bool applyBusLayouts (const BusesLayout&); void audioIOChanged (bool busNumberChanged, bool channelNumChanged); void getNextBestLayout (const BusesLayout&, BusesLayout&) const;