Sorry, I was testing with both your button and my button in the same skin.
Retested now with all JS3 buttons removed.
SITUATION 1:
Enable Auto-Device ON. Device 1 PSD, all others to None.
With SHIFT leftclick I can playback to external device. Switching off external device. Playback continues on PSB, No Popup and playback continues. All OK.
Switch external on again and switch to it with continuing playback.
Switch external off. Playback continues on Device 1 but I get the popup.
So only the first time switching the external off the popup is circumvented.
There is no such thing as only working once. I mean, it may be working sometimes and just a coincidence that it works for you the first time and not the second time.
I can test it turning it on/off 10 times, and works reliably everytime. But as I said it's also device dependent, and maybe also related to foobar version or whatever. For ex I only had 'Output invalidated' errors using ASIO, but using DS it worked fine without any additional fixes.
I have been cleaning the code a bit, and now the workaround for output invalidated may be tweaked. Clean the panel and install again (replacing this file). Now it will try first to switch to null device and also being faster should handle better the timing.
- Playback: workaround for 'Output invalidated...' is now configurable, dummy device can be set to null or primary device.
- UI: device list specifies when a device entry is associated to exclusive mode.
- UI: cleanup of device names.
- UI: general code cleanup with caching of devices priority list, so it should work faster or produce less glitches on device changes (since the device processing seems to be really sensitive to timing).