[Solved] FX plugin wrapped for VST2 receives its audio input in the output buffer

SDK for VST 3 audio plug-in and host development.
igorski81
Posts: 5
Joined: Sun Mar 04, 2018 8:35 pm

[Solved] FX plugin wrapped for VST2 receives its audio input in the output buffer

Postby igorski81 » Wed Jun 06, 2018 8:45 pm

Hi there!

I have created a plugin that processes incoming audio and it works as expected when I build it as a VST3 and test it within Bitwig Studio.
I have also used the VST2.4 wrapper but when I test it within Ableton Live it is absolutely silent. A closer debugging inspection points out that the reason for this is that the input buffers are always empty and that the actual input is routed into the VST from the output buffer ??

Similar to the AGain example I get the inputs like so:

Code: Select all


    int32 numInChannels  = data.inputs[ 0 ].numChannels;
    int32 numOutChannels = data.outputs[ 0 ].numChannels;

    // --- get audio buffers----------------
    uint32 sampleFramesSize = getSampleFramesSizeInBytes( processSetup, data.numSamples );
    void** in  = getChannelBuffersPointer( processSetup, data.inputs [ 0 ] );
    void** out = getChannelBuffersPointer( processSetup, data.outputs[ 0 ] );
   
    // processing code goes here...
   


If my processing code writes straight into the output buffer everything works according to expectation. The question is : is this something that is unique to the VST wrapper ? Is it unique to Ableton ?

igorski81
Posts: 5
Joined: Sun Mar 04, 2018 8:35 pm

Re: FX plugin wrapped for VST2 receives its audio input in the output buffer

Postby igorski81 » Wed Jun 06, 2018 10:21 pm

A further investigation led me to the conclusion that the memory pointing to the in buffer is the same as the out buffer.
I am now successfully processing the in buffer (good, as it would be equivalent to writing code thinking true means false) and found the source of the problem was a memset operation where I would clear the out-buffers by setting the values of the float** arrays to 0. This had the result that the in-buffers would also be empty (I tripled checked whether I was operating on the right pointer! Though I would have found out sooner if it weren't for the fact that Bitwig Studio and the editorhost worked just fine for the VST3 version...)

I don't need to use a memset operation to clear the output buffers as I will overwrite them sample by sample in my process cycle. However, is it common to expect that the in- and out-buffers point to the same thing ? Is this related to VST version, VST category type, the host, etc ?

reflex
Posts: 8
Joined: Tue Jun 21, 2016 1:12 pm

Re: FX plugin wrapped for VST2 receives its audio input in the output buffer

Postby reflex » Thu Jun 07, 2018 6:55 am

igorski81 wrote:However, is it common to expect that the in- and out-buffers point to the same thing ?


Yes, for processReplace anyway.

Arne Scheffler
Posts: 201
Joined: Mon Jun 20, 2016 7:53 am

Re: FX plugin wrapped for VST2 receives its audio input in the output buffer

Postby Arne Scheffler » Thu Jun 07, 2018 8:32 am

Yes, this is absolutely to be expected and even in VST3 it is possible that the input buffers are the same as the output buffers.

Cheers,
Arne

igorski81
Posts: 5
Joined: Sun Mar 04, 2018 8:35 pm

Re: FX plugin wrapped for VST2 receives its audio input in the output buffer

Postby igorski81 » Thu Jun 07, 2018 10:53 am

Thank you both very much!


Return to “VST 3 SDK”

Who is online

Users browsing this forum: No registered users and 3 guests