Garbage input until reset() is called


#1

Hi,

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.

Using ASIO DirectX Full Duplex Driver.

Input Latency 0.0ms

Output Latency 11.610ms

Realtek High Definition Aduio | Buffer Size Samples 512 | Offset Samples 0 | Audio Channels 2 | Bits Per Sample 16 | Sync Yes

 

Thanks.


#2

Sounds more like a host problem than a plugin one. It might help to say which host, plugin format and OS you're using!


#3

Sorry for not including it.

Cubase 7.5 32Bit with VST3 on Windows 8.1 Pro x64.

Using ASIO DirectX Full Duplex Driver.

Input Latency 0.0ms

Output Latency 11.610ms

Realtek High Definition Aduio | Buffer Size Samples 512 | Offset Samples 0 | Audio Channels 2 | Bits Per Sample 16 | Sync Yes


#4

"Cubase on Windows" would have been enough!

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.


#5

I highly doubt so, else why would the plugin work correctly EXACTLY after i receive a reset call, which neither juce or my plugin controls?

Also, why would a naked plugin produces the same issue? i used a debugger and breakpoint on processBlock() and checked out the input buffer.

Thanks.


#6

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?


#7

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.


#8

Ok, well I really don't know - it really doesn't sound like this would be a JUCE problem, more likely that cubase really is sending junk..


#9

I just tested with compiling it with VST2, same problem.


#10

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.


#11

Actually VST2 is worse, i never get a reset() call, ever.


#12

ok, but so what? There's no reason why you should expect the host to call reset.

I don't quite understand the problem you're having, but suspect you may just be misunderstanding something.


#13

Why is the input latency 0.0 ms? That doesn't seem right.