[SOLVED] Resume and Suspend - Audio problems

Thats strange, I am not getting any warnings either from Corona or the console when running connected? But you got a older version so that could explain it.

Joakim [import]uid: 81188 topic_id: 31901 reply_id: 128666[/import]

These are internal warnings only I can see running through a debug build of Corona.
[import]uid: 7563 topic_id: 31901 reply_id: 128669[/import]

Confirmed, it works as it should with a small sample i created so there must be something within my project.

So now I am fighting like a blind in a snowstorm :wink: How the heck should I be able to caught up those warnings? Are there any solutions for me?

Joakim [import]uid: 81188 topic_id: 31901 reply_id: 128673[/import]

@Ewing, can you send me an email at the mail below so that I can clarify some things first, before I file a bug report.

info@xxx.se

Regards, Joakim [import]uid: 81188 topic_id: 31901 reply_id: 127294[/import]

Yippiekayyy!

I managed to narrow it down and it is not an apple or Corona bug. It is some type of bug in the third party tool, levelhelper. As soon as I initiate that API and start it up, the sound bug starts. So I have contacted him, and hope that he can manage to fix that.

Thanks for your time you put in to this.

Joakim

[import]uid: 81188 topic_id: 31901 reply_id: 128699[/import]

I did some testing on other games that exits on suspend, on my iOS6 device. And they start play when the device is unlocked again.

Joakim [import]uid: 81188 topic_id: 31901 reply_id: 128624[/import]

Hmmmm…something strange is going on here. I just tried to manually start the sound but nothing happens. Any ideas, or am I doing something wrong here?

 function onSystemEvent( event )  
 if (event.type == "applicationSuspend") then  
 --os.exit()  
 audio.stop()  
 audio.dispose(bgmusic)  
 bgmusic = nil;  
  
 elseif (event.type == "applicationResume") then  
 bgmusic = audio.loadSound("sounds/mySafari.mp3")  
 print("bgmusic" , bgmusic) --Yes a valid LUA table...  
 audio.setVolume( 1, { channel=1 } )  
 audio.play(bgmusic,{channel = 1, loops=-1})  
 end  
 end  
 Runtime:addEventListener( "system", onSystemEvent )  

Joakim [import]uid: 81188 topic_id: 31901 reply_id: 128632[/import]

Sorry, I didn’t mean to imply the workaround would actually work. It was just an easy long shot thing to try. I think you found an Apple bug.

But I recommend you start with one of our simple Sample programs. Your Lua program you sent me has bugs which are triggering internal Corona warnings. It is possible the Lua bugs in your program are causing something else to break. But I noted that running your program on iOS 5.0 vs. iOS 6.0 had different behaviors which makes me say file an Apple regression bug ASAP.

[import]uid: 7563 topic_id: 31901 reply_id: 128660[/import]

Thats strange, I am not getting any warnings either from Corona or the console when running connected? But you got a older version so that could explain it.

Joakim [import]uid: 81188 topic_id: 31901 reply_id: 128666[/import]

These are internal warnings only I can see running through a debug build of Corona.
[import]uid: 7563 topic_id: 31901 reply_id: 128669[/import]

Confirmed, it works as it should with a small sample i created so there must be something within my project.

So now I am fighting like a blind in a snowstorm :wink: How the heck should I be able to caught up those warnings? Are there any solutions for me?

Joakim [import]uid: 81188 topic_id: 31901 reply_id: 128673[/import]

@Ewing, can you send me an email at the mail below so that I can clarify some things first, before I file a bug report.

info@xxx.se

Regards, Joakim [import]uid: 81188 topic_id: 31901 reply_id: 127294[/import]

Yippiekayyy!

I managed to narrow it down and it is not an apple or Corona bug. It is some type of bug in the third party tool, levelhelper. As soon as I initiate that API and start it up, the sound bug starts. So I have contacted him, and hope that he can manage to fix that.

Thanks for your time you put in to this.

Joakim

[import]uid: 81188 topic_id: 31901 reply_id: 128699[/import]

Did you ever figure out any issues in your code relating to Siri killing OpenGL? I’m not in Corona, but in my app when I quickly suspend and resume (accidentally popping up Siri) on an iPod Touch or iPhone 4S with Siri enabled, it seems to take out OpenGL. The framebuffer reports it’s ok, but drawing / presenting don’t update the view. If I manually call some code at that point to recreate the framebuffer, it fixes the issue, but I don’t have a clear hook to trigger that from, nor any way to detect the issue is broken ( the framebuffer status reports no problems ). Just wondering if you made some headway on the issue you mentioned outside of this thread. Thanks. [import]uid: 191700 topic_id: 31901 reply_id: 129397[/import]

Did you ever figure out any issues in your code relating to Siri killing OpenGL? I’m not in Corona, but in my app when I quickly suspend and resume (accidentally popping up Siri) on an iPod Touch or iPhone 4S with Siri enabled, it seems to take out OpenGL. The framebuffer reports it’s ok, but drawing / presenting don’t update the view. If I manually call some code at that point to recreate the framebuffer, it fixes the issue, but I don’t have a clear hook to trigger that from, nor any way to detect the issue is broken ( the framebuffer status reports no problems ). Just wondering if you made some headway on the issue you mentioned outside of this thread. Thanks. [import]uid: 191700 topic_id: 31901 reply_id: 129397[/import]

Yes, we investigated this bug and it is a bug by Apple. There was nothing in my code that break’d it up - something internal within iOS did this. Something within sprites caused the audio to throw errors. AcquireLock – the mutex was already locked.

I added the bug in apples system and even Corona did that. I have no clue if it ever will be fixed.

Joakim [import]uid: 81188 topic_id: 31901 reply_id: 129510[/import]

Yes, we investigated this bug and it is a bug by Apple. There was nothing in my code that break’d it up - something internal within iOS did this. Something within sprites caused the audio to throw errors. AcquireLock – the mutex was already locked.

I added the bug in apples system and even Corona did that. I have no clue if it ever will be fixed.

Joakim [import]uid: 81188 topic_id: 31901 reply_id: 129510[/import]

I also ran into that “AcquireLock – the mutex was already locked.” issue when building my app. My app would do that when I started and stopped different audio samples very quickly. I ended up having to pull that feature out of my app to avoid the error. I hope they come up with a solution.

Cheers,

  • Bret [import]uid: 168791 topic_id: 31901 reply_id: 130005[/import]

I also ran into that “AcquireLock – the mutex was already locked.” issue when building my app. My app would do that when I started and stopped different audio samples very quickly. I ended up having to pull that feature out of my app to avoid the error. I hope they come up with a solution.

Cheers,

  • Bret [import]uid: 168791 topic_id: 31901 reply_id: 130005[/import]

Apple has payed attention to my bug report and had some more questions - that I answered. So they are maybe on it - hoping that!

Joakim [import]uid: 81188 topic_id: 31901 reply_id: 130027[/import]