Copy link to clipboard
Copied
In smartFX I have gotten into the habit of checking in/out params in this fashion because it's incredibly convenient and scales based on the number of parameters:
PF_ParamDef params[NUM_PARAMS]; AEFX_CLR_STRUCT(params);
for(int i = 1; i < NUM_PARAMS; i++)
{
ERR(PF_CHECKOUT_PARAM(in_data, i, in_data->current_time, in_data->time_step, in_data->time_scale, ¶ms[i]));
ERR2(PF_CHECKIN_PARAM(in_data, ¶ms[i]));
}
The advantages of this:
Disadvantages of this:
Copy link to clipboard
Copied
plain old data (such as slider value) survives this method as it's copied to your local array. however, data that is fetched or has some temp instance of it made such as layer pixel buffers or arb param handle becomes invalid after checking in. you might get lucky an have AE still not re-use the same bit of memory until after you've finished, but you can't rely on it.
Copy link to clipboard
Copied
Thanks Shachar, good to know never to use it on arb params or layer pixels.