audio.loadStream problem

hey,

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:

audio.stop(freeChan)
audio.stop(MenuSound)
audio.stop(MnuSound)
audio.dispose(freeChan)
audio.dispose(MenuSound)
audio.dispose(MnuSound)
freeChan=nil
MenuSound=nil
MnuSound=nil

director:changeScene(“game”);

“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.)

Peach :slight_smile: [import]uid: 52491 topic_id: 17915 reply_id: 68546[/import]

nice, i downloaded the new daily build and it resolved the problem.
thks for your reply [import]uid: 92107 topic_id: 17915 reply_id: 68918[/import]

So you have a Indie/Pro account as well? If you don’t mind me asking why don’t you use that one to post?

I’m purely curious as I’ve seen a few people doing that lately and wondered if there was a reason.

Peach :slight_smile: [import]uid: 52491 topic_id: 17915 reply_id: 68950[/import]

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]

Fair enough :slight_smile: Thanks. (As I said I’ve seen a few people doing similar lately and wondered.)

Peach :slight_smile: [import]uid: 52491 topic_id: 17915 reply_id: 69267[/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]

When/how are you stopping/pausing/resuming/playing ?

Some code examples might help.

I assume you are using Director?

Peach :slight_smile: [import]uid: 52491 topic_id: 17915 reply_id: 75648[/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]