I have a a class derived from
SynthVoice. It works normally but now I’d like to add a
AudioProcessorValueTreeState::Listener to it so it can respond to parameter changes.
So I inherit the Listener class in my
SynthVoice and I need to call the
vts.addParameterListener(ID, this) function in the SynthVoice() constructor.
Now as soon as I write a constructor in the SynthVoice class it stops outputting sound.
I tried removing all the arguments and created an empty constructor:
And it still stops outputting sound.
I also tried calling the superclass constructor(SynthesizerVoice) by doing this:
and it still breaks the voice.
Is there a reason why adding an empty constructor changes the behaviour of the voice? and why? Also, is there a better way to respond to Parameter changes than using a Listener in the synthvoice class?