Audio disappears after re-opening app

Discussion and feedback on Construct 2

Post » Wed Sep 16, 2015 6:00 pm

Has anyone else had this problem? It happens to me on iPhone browser and also with compiled apps with both Phonegap and XDK. It has happened on all of the apps I have made.

It happens seemingly randomly so it is hard to reproduce. When I close the game and then open it up later, sometimes (maybe 10% of the time), the sound doesn't work and I have to close the app from the app switcher and re-open it. It's not a huge problem but I could imagine it might be annoying for users who don't know what's wrong.

I was wondering if it is something to do with the audio getting interrupted by something else, maybe like a phone call. Does anyone know if there's something I could put in my file to re-initialise the audio after the app is re-opened?

Thanks
B
6
S
1
Posts: 50
Reputation: 500

Post » Thu Sep 17, 2015 11:05 am

I also had problems with audio and still have (much less).

What worked good for me (at least on web) was:
"Browser->On suspended=set silent"
"Browser->On resumed=set not silent"

Also set "play in background" in Audio object properties.

My games have this optimization and you can check if it works for you with my games - www.crystalgames.space

Peace ;)
Positive, inspiring and jazzy games!



www.crystalgames.space



Enjoy!
B
17
S
8
G
3
Posts: 173
Reputation: 3,453

Post » Wed Sep 23, 2015 5:11 pm

Hey @Ignaci thanks for replying, I tried your suggestion but I'm still having the same problem. Actually I'm having a lot of problems with audio for my games on iOS.

Just wondering if any else has managed to stop the loss of audio and/or audio distortion after re-opening the app on their iOS games?

Also I'd be really interested to know if there is anyone who is having no problems with their audio on iOS, as that would point to it being me doing something wrong...

Thank you!
B
6
S
1
Posts: 50
Reputation: 500

Post » Wed Sep 23, 2015 8:36 pm

Hey @shortwave. There is a bug in iOS9 ( please see this - https://www.scirra.com/construct2/releases/r214 ). It. might be this for you

And if not the above problem, my solution works for my web games on my website ( www.crystalgames.space ). Maybe it does not work while exporting as a native app :)

Good luck!
Positive, inspiring and jazzy games!



www.crystalgames.space



Enjoy!
B
17
S
8
G
3
Posts: 173
Reputation: 3,453

Post » Thu Sep 24, 2015 2:46 pm

I did think about that, but I thought that bug was something which was affecting all of the sound on web games in safari, my problem is just intermittent and it's on apps that are built in cordova. I'll try building it with the new release and see what happens just in case...
B
6
S
1
Posts: 50
Reputation: 500

Post » Thu Sep 24, 2015 10:21 pm

XDK had the audio problem from 1 year back, seems its still there, phonegap never tried it, the best experience for sound was by using the coconjs by ludei, you have however to install the new plugin and right click show deprecated exporters on exporting ..

coconjs new plugin ludei and yea the latest versions having a bug in ios9 which was solved in r214 as stated in the change logs
B
70
S
20
G
67
Posts: 1,311
Reputation: 42,293


Return to Construct 2 General

Who is online

Users browsing this forum: Exabot [Bot], jakezinis and 2 guests