The bug is still there, but I’ve changed my approach. I’ve prototyped it and it seems to work. Before, when I disabled my audio, I’d just mute it and let it continue to play in the background. Now I’m actually stopping the music. I also tie into OnPause and OnPostResume of AndroidGameActivity to suspend/resume playback appropriately.
Initial tests seem to show it working on. I’ve gotta do some refactoring yet and bring the class into my framework, as well as write a crapton of unit tests, but I think I’m ok.
I’m happy to share the prototype… but I’m not entirely sure how to upload a zip file. Here’s a pastebin of the controller and player classes though.
MusicPlayer - https://pastebin.com/4aZQG4En
MusicController - https://pastebin.com/SHUfAPet