Old 02-12-2018, 02:42 PM   #1
EvanBalster
Human being with feelings
 
EvanBalster's Avatar
 
Join Date: Feb 2018
Location: Ames, IA
Posts: 2
Default Incorrect behavior with setProcessing() state?

Hello, all —

I'm developing a small custom plugin framework and testing it with REAPER. I noticed an anomaly in Reaper's calls to my VST3 plugin which is interfering with my tests.

REAPER leaves the setProcessing() state at 0 prior to starting process calls on my plugin. This goes against VST3's state model, and my plugin refuses to process as ought to be expected. It looks like certain other plugin wrapper libraries (including JUCE) will tolerate this, which could explain it going unnoticed so far.

Here's a log of calls made to the AudioProcessor, with some edits for clarity:

Code:
Create AudioProcessor:  - imitone (midi)
initialize() 
getBusInfo(Audio Input #0) 
getBusInfo(Audio Output #0) 
getLatencySamples() 
setBusArrangements(...) 
getBusInfo(Audio Input #0) 
getBusInfo(Audio Output #0) 
setBusArrangements(...) 
setBusArrangements(...) 
setBusArrangements(...) 
getBusInfo(Audio Input #0) 
getBusInfo(Audio Output #0) 
getBusArrangement(Input #0) 
getBusArrangement(Output #0) 
setBusArrangements(...) 
getBusInfo(Audio Input #0) 
getBusInfo(Audio Output #0) 
canProcessSampleSize(float64) 
getState(...) 
getLatencySamples() 
setupProcessing(44100hz, ...) 
canProcessSampleSize(float32) 

setActive(1) 
setProcessing(1) 
getLatencySamples() 
getLatencySamples() 
setActive(0) 
setProcessing(0) 

activateBus(Event Output #0 : ON) 
setBusArrangements(...) 
setBusArrangements(...) 
setBusArrangements(...) 
getBusInfo(Audio Input #0) 
getBusInfo(Audio Output #0) 
getBusArrangement(Input #0) 
getBusArrangement(Output #0) 
setBusArrangements(...) 
getBusInfo(Audio Input #0) 
getBusInfo(Audio Output #0) 
getLatencySamples() 
setupProcessing(44100hz, ...) 
canProcessSampleSize(float32) 

setActive(1)   (note: no setProcessing(1) call is made here!!)

getLatencySamples() 
getBusInfo(Audio Input #0) 
activateBus(Audio Input #0 : ON) 
getBusInfo(Audio Output #0) 
activateBus(Audio Output #0 : ON) 
process(...) 
getLatencySamples() 
getBusInfo(Audio Input #0) 
getBusInfo(Audio Output #0) 
process(...) 
getLatencySamples() 
getBusInfo(Audio Input #0) 
getBusInfo(Audio Output #0) 
process(...) 
getLatencySamples() 
getBusInfo(Audio Input #0) 
getBusInfo(Audio Output #0) 

... many more process calls ...

getLatencySamples() 
getBusInfo(Audio Input #0) 
getBusInfo(Audio Output #0) 
process(...) 

setProcessing(0) 
getLatencySamples() 
activateBus(Audio Input #0 : OFF) 
activateBus(Audio Output #0 : OFF) 
setActive(0) 
terminate() 
Destroy AudioProcessor:  - imitone (midi)
Pending any potential changes to Reaper, I'd be interested in advice on implementing fault-tolerance here. My system does have some meaningful differences in behavior when processing is off, and turning it on upon receiving a process() call would create some threading issues...
EvanBalster is offline   Reply With Quote
Old 02-17-2018, 05:47 PM   #2
EvanBalster
Human being with feelings
 
EvanBalster's Avatar
 
Join Date: Feb 2018
Location: Ames, IA
Posts: 2
Default

Looks like this was fixed in the latest update, thanks.

Code:
canProcessSampleSize(float32) $c88
setActive(1) $c88
Factory::getClassInfo(0) 
  ...Describe Audio Module Class/imitone (midi)
setProcessing(1) $c88
activateBus(Audio Input #0 : ON) $c88
EvanBalster is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 08:07 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2018, vBulletin Solutions Inc.