Hi all. I’m (still) trying to implement the DSP tutorial from scratch to understand how everything links together (thanks for all the help so far!!). I’m running into this issue where my code doesn’t recognize the MPESynthesiserBase method RenderNextBlock() (at least I think that’s my issue). I’ve created an AudioEngine class extending MPESynthesiser as was done in the tutorial but for some reason I’m getting an error when calling AudioEngine.renderNextBlock(…). I figure that extending MPESynthesiser will also extend MPESynthesiserBase since that’s the base class of MPESynthesiser, but assume I’m missing something. I appreciate any guidance here, thank you!
My header file implementation of AudioEngine
class AudioEngine : public juce::MPESynthesiser
{
public:
static constexpr auto maxNumVoices = 4;
//==============================================================================
AudioEngine();
//==============================================================================
void prepare (const juce::dsp::ProcessSpec& spec) noexcept;
private:
//==============================================================================
void renderNextSubBlock (juce::AudioBuffer<float>& outputAudio, int startSample, int numSamples) override
{
MPESynthesiser::renderNextSubBlock (outputAudio, startSample, numSamples);
auto block = juce::dsp::AudioBlock<float> (outputAudio);
auto blockToUse = block.getSubBlock ((size_t) startSample, (size_t) numSamples);
auto contextToUse = juce::dsp::ProcessContextReplacing<float> (blockToUse);
fxChain.process (contextToUse);
}
enum
{
reverbIndex
};
juce::dsp::ProcessorChain<juce::dsp::Reverb> fxChain;
};
My source file implementation of AudioEngine
#include "AudioEngine.h"
AudioEngine::AudioEngine()
{
for (auto i = 0; i < maxNumVoices; ++i)
addVoice (new Voice);
setVoiceStealingEnabled (true);
}
void AudioEngine::prepare (const juce::dsp::ProcessSpec& spec) noexcept
{
setCurrentPlaybackSampleRate (spec.sampleRate);
for (auto* v : voices)
dynamic_cast<Voice*> (v)->prepare (spec);
fxChain.prepare (spec);
}
The error when I call AudioEngine.renderNextBlock()


