My question is similar to this - https://ez.analog.com/dsp/sigmadsp/f/q-a/65902/auto-select-the-mux-input-with-signal-help
I have three inputs, A, B, and C. If any of the three inputs becomes active from being silent, a mux should switch to it.
In practice, this is what I am looking for: All inputs are silent. Audio input begins through A, the signal is detected, and a mux switches the input of the DSP to A. Input then appears on C, and the mux is switched to C. Input to A is paused for a few seconds, then played again, and the mux switches back to it. While both A and C are playing, audio appears on B, and the mux switches to input B.
To boil it down further because I have no idea if anything I am asking is making sense - I want a mux to switch to the input which has become active most recently. It does not matter if other inputs are active and have audio being input to them, if any input goes from nothing to something continuously for more than a few seconds, the mux should switch to that input. The end goal is a home theatre audio switch which automatically jumps to the most-recently-active audio source whenever anything starts playing on said source.
I've attached a screenshot of what I have so far but honestly I am completely stumped as to how to implement the switching/edge/latching logic.
I am extremely new to SigmaDSP programming and my board is still in the mail, please be gentle Thank you!!!!