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...