Skip to content

Commit

Permalink
building
Browse files Browse the repository at this point in the history
  • Loading branch information
vberthiaume committed Jul 26, 2024
1 parent 069e1d0 commit 3fd77ef
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 3 deletions.
38 changes: 37 additions & 1 deletion source/DSP/PhatVerb.h
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,43 @@ class PhatVerb
//====================================================================================================

template <std::floating_point T>
class PhatVerbWrapper : juce::dsp::ProcessorBase
struct PhatProcessorBase
{
PhatProcessorBase() = default;
virtual ~PhatProcessorBase() = default;

virtual void prepare (const juce::dsp::ProcessSpec&) = 0;
virtual void process (const juce::dsp::ProcessContextReplacing<T>&) = 0;
virtual void reset() = 0;
};

//==============================================================================

template <typename ProcessorType, std::floating_point T>
struct PhatProcessorWrapper : public PhatProcessorBase<T>
{
void prepare (const juce::dsp::ProcessSpec& spec) override
{
processor.prepare (spec);
}

void process (const juce::dsp::ProcessContextReplacing<T>& context) override
{
processor.process (context);
}

void reset() override
{
processor.reset();
}

ProcessorType processor;
};

//====================================================================================================

template <std::floating_point T>
class PhatVerbWrapper : PhatProcessorBase<T>
{
public:
/** Creates an uninitialised Reverb processor. Call prepare() before first use. */
Expand Down
4 changes: 2 additions & 2 deletions source/DSP/ProPhatSynthesiser.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ class ProPhatSynthesiser : public juce::Synthesiser
std::set<int> voicesBeingKilled;

//juce::dsp::ProcessorChain<PhatVerbWrapper<T>, juce::dsp::Gain<T>> fxChain;
juce::dsp::ProcessorWrapper<juce::dsp::Gain<T>> gainWrapper;
std::vector<juce::dsp::ProcessorBase> fxChain2;
PhatProcessorWrapper<juce::dsp::Gain<T>, T> gainWrapper;
std::vector<PhatProcessorBase<T>> fxChain2;

juce::dsp::ProcessorChain<PhatVerbWrapper<T>, juce::dsp::Gain<T>> fxChain;
PhatVerbParameters reverbParams
Expand Down

0 comments on commit 3fd77ef

Please sign in to comment.