Skip to content

Commit

Permalink
chowdsp::ForwardingParametersManager: add un-initializing constructors
Browse files Browse the repository at this point in the history
  • Loading branch information
jatinchowdhury18 committed Oct 22, 2024
1 parent 909f914 commit b22d183
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ class ForwardingParametersManager
public:
#if JUCE_MODULE_AVAILABLE_chowdsp_plugin_state
/** Initializes handles to the forwarding parameters, and connects them to the given processor */
explicit ForwardingParametersManager (juce::AudioProcessor& audioProcessor, PluginState& pluginState) : processor (audioProcessor)
explicit ForwardingParametersManager (juce::AudioProcessor& audioProcessor, PluginState& pluginState)
: ForwardingParametersManager { audioProcessor }
{
for (int i = 0; i < totalNumForwardingParameters; ++i)
{
Expand All @@ -34,6 +35,11 @@ class ForwardingParametersManager
processor.addParameter (forwardedParam.release());
}
}

/** Initializes the manager without initializing the parameters */
explicit ForwardingParametersManager (juce::AudioProcessor& audioProcessor) : processor (audioProcessor)
{
}
#else
/** Initializes handles to the forwarding parameters, and connects them to the given processor */
explicit ForwardingParametersManager (juce::AudioProcessorValueTreeState& vts) : ForwardingParametersManager (vts.processor)
Expand Down Expand Up @@ -139,9 +145,9 @@ class ForwardingParametersManager
protected:
std::array<ForwardingParameter*, (size_t) totalNumForwardingParameters> forwardedParams;

private:
juce::AudioProcessor& processor;

private:
bool forceDeferHostNotifications = false;

JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ForwardingParametersManager)
Expand Down

0 comments on commit b22d183

Please sign in to comment.