Prev Previous Post   Next Post Next
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
 

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 06:11 AM.


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