Recursive subscription function question.
Hello, Im a new programmer and I recently inherited a system with an NX4200.
I found this function handling the feedback polling of the audio DSP. It appears to be calling itself over and over again. Is this dangerous for the processor?
define_call 'DSP feedback registration'
{
if(length_string(cDSP_subscriptions[nDSP_param_polled]))
{
wait 10
{
if(VolumeCurrent[nDSP_param_polled])
{
SEND_LEVEL dvTP_Main,Volume_BTN_LVL_UP[nDSP_param_polled],VolumeCurrent[nDSP_param_polled]
}
send_string dvBiamp,"cDSP_subscriptions[nDSP_param_polled]"
nDSP_param_polled = nDSP_param_polled + 1
call 'DSP feedback registration'
}
}
else
{
if(nDSP_param_polled < 101)
{
nDSP_param_polled = nDSP_param_polled + 1
call 'DSP feedback registration'
}
}
}
Thank you!
Comments
Looks like a call that was inherited from way back in the ancient 1990's Axcess programming days. Think it only runs 100 times at pop iterating over itself 1/second - must be called repeatedly from somewhere else in code.
Better (read modern, efficient, portable, scalable, maintainable... ) way would probably be through a timeline.