mirror of
https://github.com/ARMSX2/ARMSX2.git
synced 2026-08-24 16:50:16 -07:00
Plays a looping ambient track on the library, like a console dashboard, and stops the moment a game boots. Toggle in App settings, on by default. Library-only is deliberate. SPU2 output goes through Oboe and Android has been seen reclaiming that stream when the VM pauses, so a second long-lived stream over gameplay would land on top of an existing problem. Gating on the VM state also matches what the hardware dashboards do. Defers to whatever is already playing rather than starting a second stream over a podcast, and handles audio focus: permanent loss releases the player, transient loss pauses and resumes. Starting is retried on a timer because the boot splash video carries its own audio track and MainActivity is launched from its completion callback, so the first attempt races the splash stream tearing down. A single attempt lost that race and never retried, leaving music working only after a game had been launched and exited. The player is built by hand instead of MediaPlayer.create, which prepares internally and would leave the media audio attributes ignored. Track: Calm Ambient 1 (Synthwave 4k) by The Cynic Project, released CC0. Attribution is not required by that licence but the author asks for it, so it is credited in the About screen.