#Mobile GX.Games Audio not resuming after Reopening Game

4 messages · Page 1 of 1 (latest)

civic hollow
#

Hey! I've been trying to make a game I'm working on for the GX.games platform run on both PC and mobile. Things have worked like charm so far!

There is just one thing that continues to plague me due to the platform difference.

Not on pc, but on mobile, whenever I minimize the app, and then open another app, the audio in game just completely stops!

It works just fine if you don't open another app and immediately reopen the game though, funnily enough.

I checked the audio debug overlay, and it looks as though the sound just STOPS!.. Not like, the whole "audio stop sound" kind where it turns cyan on the overlay and then disappears right away.. Not yet, anyways.

Actually, the background song stays white but stops moving through the "pos" hex code, then one SFX audio can get stuck on cyan (stopping) and remains in the debug, and the rest that try to play get stuck on magenta (marked for playing soon but waiting on "initial conditions"), and then no sounds play at all 😭

I'd love for my game to be able to pick its audio back up even if the player pauses to check their text messages or whatever.

Here's what I tried:

  • os_is_paused to audio pause all if true and audio resume all if false (this is what made it work after closing and reopening the app originally, but this same fix does not carry over if you open another app before reopening.)
  • Also attached an audio_group_load(audiogroup_default) just in case the problem was that the audio_group_is_loaded(audiogroup_default) returned false and it was the problem. It was not the culprit.
  • Tried making it only attempt to resume audio after interacting, since it only plays audio once you tap the screen first on mobile, but it still waits to play it.
  • Tried putting its own audio sync group (I tried using those to make things work since I thought I could at the very least resume all songs in each sync group afterwards, but it ended up doing nothing so I backtracked)
#

Image Explanations (Going from left to right first and then up to down)

  1. Just launched, music not playing
  2. After tapping/interacting, music starts
  3. Opened up after checking app (paused with the resume/quit options showing), music is paused
  4. Resumed game (music plays)
  5. Immediately after reopening game after opening other app (all sounds and music are no longer playing, but continue to attempt to load in)
  6. A bit after launching and even after interacting, the game is still not loading in any audio
#

I tried different methods for pausing/stopping the audio and resuming/replaying it, but I think it has something to do with the audio system in gamemaker itself, because the audio is recognized as being there- it just refuses to play

civic hollow
#

I think I’ll post a bug report for this or something
Doesn’t seem anyone is interested in helping if they even know how to
In the meantime, I’ll try my temporary “restart the whole ass game if you open something else on mobile” overdramatic ahh solution LOL