-1

For a project, I am being asked to create a VST using the Steinberg SDK, i'm using version 2.4.

The issue that I'm having is error:

cannot allocate an object of abstract type 'mySynth'.

When attempting to compile, the error brings me to this section of code:

    AudioEffect* createEffectInstance (audioMasterCallback audioMaster)
    {
            return new mySynth (audioMaster);
    }

I'm a beginner to both c++ and VST programming, I've had no issues compiling the sample AGain and ADelay, as well as the vstxSynth. This is the first attempt of my own, and its really confusing me, from looking at the sample code i cannot seem to find any reason as to why this shouldn't work.

any help would be greatly appreciated. As this is a major learning curve for me, i would appreciate if you could apply with a simplest explanations as possible.

Thankyou :)

4

2 回答 2

2

没有看到类mySynth代码很难说,但是当你有一个包含纯虚函数的类时,通常会遇到这个错误。要么,要么您从具有纯虚函数的基类派生并且未能用派生类实现覆盖它。

如果您不知道这意味着什么,请在您的类(和子类)中查找像这样声明的函数

 virtual int my_function() = 0;

这种函数是纯虚函数,具有虚函数的类被认为是抽象类,不能实例化。为此,您需要提供一个实现。

于 2012-11-08T22:36:51.140 回答
0

您的processReplacing()方法未正确覆盖基类中声明的签名AudioEffect。签名如下所示:

void processReplacing(float** inputs, float** outputs, VstInt32 sampleFrames);

您的覆盖正在使用double,它应该使用float

于 2012-12-05T09:47:38.007 回答