Skip to main content
Known Participant
March 3, 2014
Question

How to support backward compatibility in an effect plug-in?

  • March 3, 2014
  • 1 reply
  • 475 views

How to handle a project file that include an effect saved with an older version of my plug-in?

When my new version of the plug-in detects such a file, I want it to redirect the subsequent AE callbacks to the older implementation.

However I am not sure how to get the old version number.

In which of the structures sent by AE is this information saved? And at which point during the sequence of AE function callbacks can I access it safely?

I suspect it must be done before PF_Cmd_PARAMS_SETUP, since after that, the number of parameters will have been notified to AE and it will consider a file with a different number of parameters erroneous.

More generally, do you have advices / good practices to share about backward compatibility?

This topic has been closed for replies.

1 reply

Community Expert
March 3, 2014

as far as i know, the old version number is not handed to you at all.

i store the version number at every place where i store custom data.

(sequence data, arb params)

but that should not be confused with backwards compatibility when it comes

to parameters.

during param setup, each param is given a numerical identifier (DISK_ID).

as long as that numerical identifier belongs to the same param regardless

of it's index in the param list, AE will associate the correct data stream

from the old version to the correct param in the new version.

params that were omitted and their old ID is no longer in use will simply

be discarded by AE.

new params with IDs that weren't present in the old version will be given

new data streams.

if you're planning some shenanigans during param setup in regards to

setting up params according to some old version settings (if present), then

keep in mind that param_Setup is only called once per session for each

plug-in, and not once for each instance. so whatever you do will apply to

all instances.

wil_Author
Known Participant
March 3, 2014

Hi Shachar, thank you for the information about the parameters ID.