When I call the command media.pauseSound and then I call media.playSound it starts from the beginning. Am I doing something wrong or is media.pauseSound behaving just like media.stopSound?
[import]uid: 8192 topic_id: 2608 reply_id: 302608[/import]
You should be able to continue playing by calling media.playSound() (without any parameters).
-Tom [import]uid: 7559 topic_id: 2608 reply_id: 7440[/import]
That is exactly what I am doing. It starts from the beginning again. [import]uid: 8192 topic_id: 2608 reply_id: 7455[/import]
Check out the AudioPlayer sample in the Corona SDK. There is a pause/play button for media.playSound. Does that sample work for you?
-Tom [import]uid: 7559 topic_id: 2608 reply_id: 7458[/import]
Tom, sorry to be a pain but I am surfing all around the new site and can’t find a link to the regular SDK just the game edition. As soon as I find it I will try it out. [import]uid: 8192 topic_id: 2608 reply_id: 7461[/import]
http://developer.anscamobile.com/downloads/CoronaSDK
Sorry we don’t have a good link to it on our site.
-Tom [import]uid: 7559 topic_id: 2608 reply_id: 7463[/import]
Ok. Figured it out. I had a function in my sounds module that called media.playSound (“name of the song.mp3”) I would call that to come back from pause and it would reload the file.
Although reading the api again, it states that after you play the first time you should call the function without parameters. It is still a bit missleading. Hopefully better syntax will come with the new audio api. Thanks for the help. This might explain why my volumes were messed up to.
Thanks Tom. [import]uid: 8192 topic_id: 2608 reply_id: 7466[/import]
We are working to improve the API documentation, including sample code clips. We try to provide sample code with Corona that demonstrates and test the API features and always looking to improve our coverage.
I’m glad you figured it out.
Thanks,
-Tom [import]uid: 7559 topic_id: 2608 reply_id: 7469[/import]