Alright I know it has to do with the dynamic sound and the Bluetooth buffer, but why can’t you buffer the events (passengers appearing etc.) along with the audio? And if that would be too much work (I understand it would probably involve a rework of the current system, and that would take a lot of effort) couldn’t you just have the audio lag behind the game? Sure it’s not great, but it’s better than the audio just not working at all.
We might be able to fix it by increasing the buffer size on Mini Metro’s audio mixer. I don’t know what you’ve read about the issue elsewhere, but the problem with that is in order for the audio to generate properly the audio forces the game to commit to sound-generating actions ahead of time. In Mini Metro’s case this all events are committed to 150ms prior to when they actually happen. (You can see this on PC if you press the escape just prior to a passenger spawn — the sound will play even though the passenger won’t appear because of the pause, and when you resume the passenger will silently appear.) For a game like Mini Metro with only a handful of interactions, which are all fairly predictable, this isn’t that hard to do. We should be able to crank up the latency to 500ms. Unfortunately we had to retro-fit the prediction / committing after the core game code had been finished and stable for about a year, so doesn’t fit into the game’s logic as well as it could. Hardening it to work with a higher latency is a ton of work that we can’t justify.
Anyway, just realised that’s not really what you were asking. When I was looking into the issue on Android, I found that when the device realises the audio thread is going to starve it actually kills the audio thread. The app has no warning whatsoever; Android just kills the thread and doesn’t give the app a second chance to play audio. In theory we could put a check in at boot so the game knows if the thread was killed in a previous run, and starts in a lagged, high-latency mode. It would require a force-close and restart though. I haven’t looked at the low-level mixing code for a while so I don’t know how feasible this would be.