forked from unom/punktfunk
Apple and Android both shipped a real audio-format picker; the desktop had a stopgap env lever, because `SessionParams` had no field for it and the one struct literal that fills it lives in another crate. It has one now, and the four clients share a vocabulary. The stored values are byte-identical to Android's and Apple's — `opus`, `lossless48`, `lossless96` under the key `audio_format` — because a profile that round-trips between a phone and a TV but not to the desktop is the exact bug worth avoiding. They are read from those clients rather than invented here, and a value this build does not recognise resolves to Opus rather than refusing the connect. `PUNKTFUNK_AUDIO_HIRES` still overrides the setting, in BOTH directions, which is how this crate already treats every other `PUNKTFUNK_*` lever. A lever that loses to a stale profile is useless for the thing operators reach for it for, and one that can only switch a feature ON is half a lever. One behaviour deliberately changed: an unparseable value used to mean "off". It now warns and is ignored, so the user's setting still decides — garbage silently defeating a switch somebody set in a UI is worse than the pre-UI behaviour it replaced. Unset, off and garbage are three distinct outcomes now, and a test pins all three. The precedence itself is a pure function of (env, setting) so it can be tested without mutating the process environment, which is the idiom the neighbouring parse already used. Stats carry the RESOLVED format off the Welcome, never the requested one, and the OSD prints it — a desktop that says "lossless" while the host declined is the same class of lie as claiming a sample rate you did not get.