Move CALLBACK into the 'init' section,

to have it called once only.
This commit is contained in:
Holger Vogt 2025-08-03 11:30:53 +02:00
parent 5e21393fbb
commit b7692fbda7
1 changed files with 3 additions and 2 deletions

View File

@ -71,11 +71,12 @@ void cm_d_osc(ARGS)
double ctl, period, delta, when;
int csize, i;
CALLBACK = cm_d_osc_callback;
csize = PARAM_SIZE(cntl_array);
if (INIT) {
CALLBACK = cm_d_osc_callback;
/* Validate PWL table. */
for (i = 0; i < csize - 1; ++i) {