The Synthesis ToolKit in C++ (STK) is a set of open source audio signal processing and algorithmic synthesis classes written in the C++ programming language.
This modification allows for creating classes that inherit from StkFrames.
In StkFrames class, private members were changed to protected. The following methods were made virtual: ~StkFrames, operator= and resize (both versions). These method allocate/free memory for the data pointer, so they have to be virtual.
An example usage is wrapping a pointer to buffer provided in a callback function into a custom class derived from StkFrames. Such a class may be passed to STK functions as an argument of StkFrames, using polymorphism.
The attached example is crtsine.cpp project from STK, reworked using a custom wrapper.
This modification allows for creating classes that inherit from
StkFrames
.In
StkFrames
class,private
members were changed toprotected
. The following methods were made virtual:~StkFrames
,operator=
andresize
(both versions). These method allocate/free memory for the data pointer, so they have to be virtual.An example usage is wrapping a pointer to buffer provided in a callback function into a custom class derived from
StkFrames
. Such a class may be passed to STK functions as an argument ofStkFrames
, using polymorphism.The attached example is
crtsine.cpp
project from STK, reworked using a custom wrapper.crtsine.cpp.txt