diff --git a/Source/CommonPluginProcessor.cpp b/Source/CommonPluginProcessor.cpp index fe95c5c..7d93fc4 100644 --- a/Source/CommonPluginProcessor.cpp +++ b/Source/CommonPluginProcessor.cpp @@ -12,10 +12,9 @@ #include "components/AudioPlayerComponent.h" //============================================================================== -CommonAudioProcessor::CommonAudioProcessor() +CommonAudioProcessor::CommonAudioProcessor(const BusesProperties& busesProperties) #ifndef JucePlugin_PreferredChannelConfigurations - : AudioProcessor (BusesProperties().withInput("Input", juce::AudioChannelSet::namedChannelSet(4), true) - .withOutput("Output", juce::AudioChannelSet::stereo(), true)) + : AudioProcessor(busesProperties) #endif { // locking isn't necessary here because we are in the constructor diff --git a/Source/CommonPluginProcessor.h b/Source/CommonPluginProcessor.h index 0daf153..d85baf5 100644 --- a/Source/CommonPluginProcessor.h +++ b/Source/CommonPluginProcessor.h @@ -25,7 +25,7 @@ class CommonAudioProcessor : public juce::AudioProcessor, public SampleRateMana #endif { public: - CommonAudioProcessor(); + CommonAudioProcessor(const BusesProperties& busesProperties); ~CommonAudioProcessor() override; void addAllParameters(); diff --git a/Source/PluginProcessor.cpp b/Source/PluginProcessor.cpp index 4ed2db7..e1b63a7 100644 --- a/Source/PluginProcessor.cpp +++ b/Source/PluginProcessor.cpp @@ -18,7 +18,7 @@ #include "audio/EffectParameter.h" //============================================================================== -OscirenderAudioProcessor::OscirenderAudioProcessor() { +OscirenderAudioProcessor::OscirenderAudioProcessor() : CommonAudioProcessor(BusesProperties().withInput("Input", juce::AudioChannelSet::namedChannelSet(2), true).withOutput("Output", juce::AudioChannelSet::stereo(), true)) { // locking isn't necessary here because we are in the constructor toggleableEffects.push_back(std::make_shared( diff --git a/Source/SosciPluginProcessor.cpp b/Source/SosciPluginProcessor.cpp index 05477d5..7e5d376 100644 --- a/Source/SosciPluginProcessor.cpp +++ b/Source/SosciPluginProcessor.cpp @@ -2,7 +2,7 @@ #include "SosciPluginEditor.h" #include "audio/EffectParameter.h" -SosciAudioProcessor::SosciAudioProcessor() { +SosciAudioProcessor::SosciAudioProcessor() : CommonAudioProcessor(BusesProperties().withInput("Input", juce::AudioChannelSet::namedChannelSet(4), true).withOutput("Output", juce::AudioChannelSet::stereo(), true)) { // demo audio file on standalone only if (juce::JUCEApplicationBase::isStandaloneApp()) { std::unique_ptr stream = std::make_unique(BinaryData::sosci_flac, BinaryData::sosci_flacSize, false);