Files
SpotiFLAC-Mobile/android/app/src/test
zarzet 4ed523ac03 fix(usb): hand the DAC back at the level it connected with when playback ends
Direct USB lowers a DAC to at most -40 dB when it opens it and never wrote a
level back, so once the app let go of the DAC, Android's mixer played every
other app through a DAC left that low: quiet until it was unplugged.

When the playback session ends (the player is stopped, or the engine goes
away), the app now pauses, writes back the level the DAC had when the app
first opened it after it was attached, and lets go of it. It only undoes its
own lowering: a DAC that reads higher already is left alone.

Not between two songs. There a song can follow through Android's mixer
(a stream, a format the output refuses), and with the level back up it would
play 40 dB louder than the one before. That case stays quiet as before, and
a session that ends without the DAC open forgets the level instead of
writing a stale one later. A killed app cannot write anything.

Not run on a DAC.
2026-11-19 18:08:02 +07:00
..