AmpliPi icon indicating copy to clipboard operation
AmpliPi copied to clipboard

Vsrc values drift on system reboot

Open SteveMicroNova opened this issue 1 month ago • 1 comments

When you use a stream that uses a vsrc value, it will go to one of the sources in [v0, v1, v2, v3]. If you leave one such stream open when rebooting the system, the list of vsrcs drifts to [v1, v2, v3, v4], leaving v0 inaccessible and creating a nonexistent v4

This isn't a bug that breaks anything except for any streams that uses a subprocess to keep an eye on the amplipi-side state such as the upcoming #1063 that adds a listener to Spotify streams to watch the volume(s) of the connected zone(s) to synchronize the volume across both the Spotify client and AmpliPi, I suspect a similar method would be used for airplay as well

SteveMicroNova avatar Nov 11 '25 18:11 SteveMicroNova

This is a misunderstanding of what a vsrc is. A vsrc is a virtual source, an ALSA loop to stay connected to so that the whole stream doesn't have to start up from square 1 every time you open it

Skipping v0 is still a potential problem, but v4 does indeed exist

I'll have to chain my spotify and airplay scripts to some other identifier

SteveMicroNova avatar Nov 11 '25 20:11 SteveMicroNova