COCKOS
CONFEDERATED FORUMS
Cockos : REAPER : NINJAM : Forums
Forum Home : Register : FAQ : Members List : Search :
Old 09-07-2018, 05:51 AM   #1
SaschArt
Human being with feelings
 
SaschArt's Avatar
 
Join Date: Aug 2013
Posts: 236
Default Call order as rule

I can rely on the call order: OnParamChange() then ProcessDoubleReplacing() ?


Or are there situations where ProcessDoubleReplacing() is called before all parameters are called by OnParamChange() ?
__________________
Audio plugins | BrainWaveProducer | EmRysRa
SaschArt is offline   Reply With Quote
Old 09-07-2018, 06:10 AM   #2
Xenakios
Human being with feelings
 
Xenakios's Avatar
 
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,062
Default

I wouldn't assume anything. If it's very critical for you to know, you will have to test it with every host.
__________________
I am no longer part of the REAPER community. Please don't contact me with any REAPER-related issues.
Xenakios is offline   Reply With Quote
Old 09-09-2018, 02:31 AM   #3
Tale
Human being with feelings
 
Tale's Avatar
 
Join Date: Jul 2008
Location: The Netherlands
Posts: 3,645
Default

Quote:
Originally Posted by SaschArt View Post
I can rely on the call order: OnParamChange() then ProcessDoubleReplacing() ?
I think you can, because VST2 calls OnParamReset() on effOpen, and AU calls it on kAudioUnitInitializeSelect. I don't know about VST3 or AAX though, but suspect they also call OnParamReset() on init, and therefore before any processing.
Tale is offline   Reply With Quote
Old 10-16-2018, 12:52 AM   #4
SaschArt
Human being with feelings
 
SaschArt's Avatar
 
Join Date: Aug 2013
Posts: 236
Default

Need an order available to any host, so I fix this with:

init_prm=false; in CTOR

if (id==kNumParams-1) init_prm = true; on OnParamChange

if (!init_prm) return; on ProcessDoubleReplacing

This force order: : OnParamChange() then ProcessDoubleReplacing()
__________________
Audio plugins | BrainWaveProducer | EmRysRa
SaschArt 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 04:38 AM.


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