Its been 2 days that im trying to figure out whats the problem with no success.
The first time i press play, my plugin (a trigger) receive a correct input buffer in processBlock().
Then i press stop and start again, the few first calls of processBlock() the input buffer is filled with garbage (more precisely, silence), and this stays like this no matter how many time i presse stop and start, until the reset() function is called (after around 16 seconds)).
Why is the reset function not called right after i press stop or before start? This is very weird.
Or is there any way to force reset things in the host so it sends me correct data?
My reset function code and processblock function code has nothing to do with it, since creating a new plugin project with no custom coding produces the same bug (affirmed by debugging with ollydbg).
If someone could shed some light...
Sorry for not including it.
Cubase 7.5 32Bit with VST3 on Windows 8.1 Pro x64.
I haven't heard that before, and would be surprised if Cubase did that because then all plugins would make a noise when they start up.. You should probably double-check that this isn't your own bug.
Ok, but the input buffer can contain random data, e.g. it could just audio input from a microphone. Your plugin needs to be able to work correctly as soon as it gets created, regardless of whether reset is called, right?
Exactly, exactly when i start cubase and start the plugin, the very first time i press play everything works perfect, then if i press stop then start, it will get garbage data in the first few calls of processBlock(), then i press stop, wait 10 seconds to get that reset call and it works perfect again, and again the same thing after stop/start.
I have no input devices at all, i only inserted a track and imported an mp3 file, i have nothing else on the project.
In that case it's almost certainly not a juce problem, as the code-paths for VST2/3 are completely different, and it's highly unlikely they'd each have the same bug. It sounds like cubase really is sending you that data, but I have no idea why they'd send it if it's incorrect.