young.javier
Member
I'm trying to code an effect chain (programmable by user) so I need to be able to instantiate different effects and connections. For now I've been able to code a delay and a reverb effect, but when I got to add a WaveShaper I'm running into a runtime error.
The thing is, if I use it like as follows it works good:
But if I instntiate it using new, the program breaks:
Any ideas?
Thanks
The thing is, if I use it like as follows it works good:
Code:
AudioEffectWaveshaper waveshaper;
EffectWaveshaper::EffectWaveshaper() {
// ...
this->effectLeft = &waveshaper;
// ...
}
But if I instntiate it using new, the program breaks:
Code:
EffectWaveshaper::EffectWaveshaper() {
// ...
this->effectLeft = new AudioEffectWaveshaper();
// ...
}
Any ideas?
Thanks