Your app works, but audio devices change (USB, HDMI connect, disconnect), and as far as I can tell it only keeps the devices alive that it saw on startup. Perhaps keep an eye on new devices and/or rescan every xyzseconds?
It keeps track of new devices too, but works for current primary device only by default. Add All to file name of the program to enable it on all outputs.
Your app works, but audio devices change (USB, HDMI connect, disconnect), and as far as I can tell it only keeps the devices alive that it saw on startup. Perhaps keep an eye on new devices and/or rescan every xyzseconds?