I am working on one of the STK programs using a Sine Oscillator callback. I am having issues when creating an object from my ToneGen class that inherits from the Generator Class due to a Virtual function in the Generator class that causes my ToneGen class to abstract. i Have tried pointers but it seems to be causing issues getting the data to the appropriate method. If i use pointers my code breaks here in the ToneGen.h file
void setRate( StkFloat rate ) { rate_ = rate; };
Otherwise without pointers i get this error
src\crtToneGen.cpp(36): error C2259: 'stk::ToneGen' : cannot instantiate abstract class
due to following members:
'stk::StkFrames &stk::Generator::tick(stk::StkFrames &,unsigned int)' : is abstract
C:\VS10 Projects\StkNewInst\crtToneGen\include\Generator.h(43) : see declaration of 'stk::Generator::tick'
Here is the Virtual Function in the Generator Class
virtual StkFrames& tick( StkFrames& frames, unsigned int channel = 0 )=0;
Is there anyway to avoid this, i have tried several other techniques on other post but have not had any luck yet.
The Code i am modifying can be found here
I am doing this on VisualStudio 2010 windows 7 32 bit