Juce plug-ins in Wavelab doubling spacebar message


#1

Hi,

 

While running my plug-in in Wavelab (8.0.3 on Windows, 32-bit and 64-bit) I noticed that if the plug-in is in focus and you hit the space bar to start/stop the audio playback the host appears to receieve the message twice. This results in playback maintaining the state it was in before (i.e. doesn't start or doesn't stop), but when it is playing the playback start marker updates it's position, which is what makes me think the message is getting through twice.

 

I have tested this with the audio plug-in demo from the latest Git commit (4a37aa0) and with other comercially released plug-ins (including PPMulator), which all show the same bug. I have also tested on Mac (same Wavelab version) and the bug does not exhibit there.

 

I can only assume that other key commands are also being doubled, but the space bar is the only one which is obvious enough to demonstrate the issue.

 

For clarification, the recipe is:

- Load a Juce plug-in in Wavelab 8.0.3 in Windows

- Begin audio playback

- Click the plugin GUI to give it focus

- Hit the space bar

 

Thanks,

Luke.


#2

Ah Wavelab.. the biggest PITA of all the hosts. Presumably it's sending keypresses to the plugin's window, which would make the win32 hooks that are normally needed unnecessary.

My wavelab license expired some time ago, but could you see whether it works if you make this change, in juce_WindowsHooks.h, line 48 ?

                if (! getHostType().isWavelab())
                    keyboardHook = SetWindowsHookEx (WH_GETMESSAGE, keyboardHookCallback,
                                                     (HINSTANCE) Process::getCurrentModuleInstanceHandle(),
                                                     GetCurrentThreadId());


#3

Hi Jules,

 

Sure thing, I will test that for you tomorrow morning and let you know!

 

Thanks for your response,

Luke.


#4

Hi Jules,

 

I have just tried your suggested fix and I'm afraid it did not work. Any other suggestions?

 

Luke.


#5

..hmm. Nope, that's all I can think of, I'm afraid. It might help if you could show me the call stacks for each of the two event callbacks?


#6

Hi Jules,

 

Sorry it took me so long to do this!

I have attached two screen prints of the call stacks when hitting the spacebar (it didn't help that Wavelab seems to call this function constantly...). As you can see the first call does go through Juce but the second call seems to come straight from the host.

 

Also of note is that when I added back in the fix you suggested before and tried to break in the same place I found that the keyboardHookCallback function isn't getting called at all, yet the problem remains...

 

Luke.


#7

If you'd used my suggested fix, then it would be impossible for that second call to arrive, because the hook function would never have been registered. Perhaps try the fix again, and step through it to see why it's not working? 


#8

Hi Jules,

 

I have a project whose release is imminent and would like to get this issue sorted if possible.

I have just taken another look at this using the latest release of WaveLab (8.5.10) and it is still a problem. Removing the keyboard hooks as you first suggested does stop the calls arriving at keyboardHookCallback() but pressing the space-bar (when audio is playing) still pauses and then resumes playback almost instantaneously.

Is there any chance you could take a second look at this?

 

Thanks,

Luke.


#9

I'm both hectically busy right now, and I also don't have any further suggestions on what to try..


#10

Hi everybody!

 

Luke, do you have solved this issue somehow?

We have the same problem in our plugin and we found out that the problem appears in the JuceDemoPlugin, too. So it seems to be a bug in the juce code and I don't know where I should search for it.

I would be grateful for any suggestions.

 

Best regards,

Yann


#11

Hi Yann,

 

If you follow the conversaion Jules and I had above you will be able to see what we tried (and where in the source) in order to try to fix this issue.

I have looked in to it a little more since but I have yet to come up with a solution, or find the real root of the problem.

 

Please let me know if you have any luck tracking the issue down, I'd be very interested to see what the problem was!

 

Luke.


#12

I don't know how much code Steinberg share between their products, but this thread may be relevant:

http://www.juce.com/forum/topic/plug-ins-using-juce-bring-down-cubase-8