This project has moved. For the latest updates, please go here.

Audio

Topics: VST.NET Core
Oct 7, 2015 at 10:46 AM
Edited Oct 7, 2015 at 10:48 AM
I had a third question about audio (using the Core.dll)^^, but I managed to figure it out :-)

The particular VST Im making doesn't touch the audio buffers (in ProcessReplacing), so I have left them as they are in the Sample, but then if I loaded the VST onto an audio track in a host, the original stereo audio was coming out mono.

Then I realized that ProcessReplacing was setting all the outputs to input(0), which I guess would be doing only one channel?

{
foreach (VstAudioPrecisionBuffer audioBuffer in outputs)
        {
            for (int n = 0; n < audioBuffer.SampleCount; n++)
            {
                audioBuffer[n] = input[0][n];
            }
        }
}

Anyway, I found that changing that code to iterate through the outputs by index instead of "for each ", and setting each iteration to input[index] did the trick so I get full stereo.

Cheers,
Coordinator
Oct 8, 2015 at 6:48 AM
Hmm, that code is indeed not entirely correct.
The entire sample is meant to give you an idea what programming against the core is like. The method implementations should all be removed if you use it as a skeleton to get started.

To be even more efficient you may want to check out the VstAudioBuffer.CopyTo method...
https://vstnet.codeplex.com/SourceControl/latest#Source/Code/Jacobi.Vst.Core/VstAudioBuffer.cs

It's quicker that the code you have now.
Oct 9, 2015 at 6:16 AM
Thanks, I'll check it out!