GLBasic forum

Main forum => GLBasic - en => Topic started by: fjsantosb on 2010-Jan-30

Title: Sounds stop working when App comes from Stand By - iPhone
Post by: fjsantosb on 2010-Jan-30
Hi there,

While testing my last iPhone App, I have found that sounds stop working when iPhone comes from stand by mode.
Music stop playing and sounds stop working (commands like playsound doesn't work anymore untill you restart your app).

Anyone have detected the same problem?

King Regards, fjsantos.

Update1: I could reproduce the bug, its seems it depends on how much time the iPhone is on stand by mode (about 1 or 2 minuts and the when awake, the music off).

Update2: I get some herratic behaviour when I awake from stand by mode, some of them reset the App.
Title: Re: Sounds stop working when App comes from Stand By - iPhone
Post by: Kitty Hello on 2010-Feb-01
uh-oh.
It might be the GETTIMERALL(), that (for the sleeping app) has a big skip suddenly. Hm...
Title: Re: Sounds stop working when App comes from Stand By - iPhone
Post by: fjsantosb on 2010-Feb-01
Hi,

Thanks for you reply, I tried on differents iPhones (3G, 3Gs) and iPod Touch (1G, 2G) to verify the bug, and i can confirm that.

King Regards, fjsantos.
Title: Re: Sounds stop working when App comes from Stand By - iPhone
Post by: Sokurah on 2010-Feb-02
I checked the "GLBasic iPhone Limitations (http://www.miscthings.co.uk/GLBasic/iphone_ipodlimitations.html)" link I found in another thread, and it said;

Quote
If the HOME button is pressed, the operating system will exit your program

Does this mean that it will exit right away, or can you still call a function to save something before exiting, or...?
Title: Re: Sounds stop working when App comes from Stand By - iPhone
Post by: fjsantosb on 2010-Feb-02
Hi Sokurah,

When you hit the 'HOME' button, any application will exit.
But you can save settings or game state on GLB_ON_QUIT, this subroutine is call always that app exit.

King Regards, fjsantos.
Title: Re: Sounds stop working when App comes from Stand By - iPhone
Post by: MrTAToad on 2010-Feb-02
Quote
Does this mean that it will exit right away, or can you still call a function to save something before exiting, or...?
Gernot has said you have got a very small time before the program will exit - during this available time you can save your data, but no graphics or anything like that can be used.
Title: Re: Sounds stop working when App comes from Stand By - iPhone
Post by: Sokurah on 2010-Feb-02
Quote
Does this mean that it will exit right away, or can you still call a function to save something before exiting, or...?
Gernot has said you have got a very small time before the program will exit - during this available time you can save your data, but no graphics or anything like that can be used.

Oops, perhaps I haven't been paying as much attention as I thought. :D

Thanks. ;)