i have a problem on ipad, i am using this code to play a sound in my menu:
local MenuSound = audio.loadStream(“sons/menu.mp3”);
local freeChan = audio.findFreeChannel()
local MnuSound = audio.play( MenuSound, { channel=freeChan } )
audio.setVolume(1, { channel=freeChan} )
when i change to a different scene with director, i use this code to stop the sound:
“i just tried to stop everything cus it wasnt working.”
when i come back from my game scene i run the play code again, the sound plays for some 3-4 seconds and just stops.
i tried with the loadsound instead, it works but takes some time to load the sound.
what can be the problem? thks
[import]uid: 92107 topic_id: 17915 reply_id: 317915[/import]
This sounds like the iOS5 audio bug - if you build using daily build .645 or above this has been remedied. (Test users don’t have access to daily builds however so you will need to become a licensed developer or wait until the next stable release.)
no really big reason, just always used this one :D, had this one before, and made a new account for when i got pro. [import]uid: 92107 topic_id: 17915 reply_id: 69177[/import]
Hey peach, i am running into this same problem, and i have updated my corona to daily build 714 and it still is not fixing the problem. In my case, i have a menu song playing, i enter my level and the menu music is stopped, and the level music starts. I then return to my menu, my level music is stopped, and the menu music starts up again but after 3-4 seconds cuts out.
I am using audio.loadStream in both cases… let me know know if you have any other thoughts or ideas. [import]uid: 19620 topic_id: 17915 reply_id: 75586[/import]
I am stopping my audio right before changing scenes using director class, and i am using audio.stop() on the same handle that i used to do audio.play(). Anyways i will get back with actual code examples tomorrow. Also i found out that the issue happens in the simulator, but i built to the ipad, and the issue doesn’t seem to appear, but it does in the simulator. [import]uid: 19620 topic_id: 17915 reply_id: 75730[/import]