Ok, the only problem that I see with your new code is with the skip instruction:
Code:
skip t1, ccr, 0x100, 2 ; if FXBInL = 0.. then Skip next 2 instructions
Remove 't1' and use 'ccr' instead as I said in my previous post.
The comment is wrong, should read:
if
FXBInR != 0.. then Skip next 2 instructions
(note the 'R' and the "!=")
The rest would just be optimizations to get rid of the temp variables, etc.
The only problem with such a plugin, is with audio sources that have parts in them that are completely silent (i.e. value of 0). With no noise floor (digital material), such silences can cause it to act up. It would be good to add a timer of some sort to keep it from unmuting the other input during short periods of silence, etc.