hey,
I am a newbie , i am developing a app using audio files, the app is working fine in simulator but not on the device. What could be the problem, is there any way to find , pls suggest me some solution . I am so confused …
hey,
I am a newbie , i am developing a app using audio files, the app is working fine in simulator but not on the device. What could be the problem, is there any way to find , pls suggest me some solution . I am so confused …
Hard to say with no sample of your code but check that you are loading/disposing of your music correctly. It could be a timing issue since the simulator runs much faster then the actual devices, so perhaps the audio is not being loaded in time when on the device.
I suggest you add a few debug print statements in your code, like print(“LOADING SOUND xxx HERE”), etc etc right before you do some audio code (Such as audio.play, audio,stop, audio.dispose)
Then plug your device into your computer and open up xcode.
You should see your device in the list on the left within xcode, then select CONSOLE.
Now run your game and wherever there is a bug or error, the xocde console should show you where in your code is the issue.
If you don’t get any errors then perhaps the format of your audio is incorrect? Check elsewhere on this site for the correct audio.
Sorry thats all i can think of outta my head right now.
Cheers.
Can u tell me where i have to dispose the audio file exactly. More over i am not using xcode.
Actually disposing of audio is only necessary if you have alot of them loaded and need to free up memory. You simply do an audio.dispose(audiofilename);audiofilename=nil (but make sure you stop or check the audiofilename first).
But again if you do this u have to remember to reload the audio in again when u need it. So this is only worthwhile at the end of a level or something, you wouldn’t do this during gameplay.
So load audio files at start of level, then dispose of them when u finish the level. That way any screens in-between have more memory freed.
Yeah you don’t need to be using xcode I also don’t use xcode. BUT, if you want to see why something is not working on your device, then you simply plug the device into your computer, and open xcode software (which must already be on your computer otherwise i don’t think you could even run corona simluator).
Hi @kumarks102. I believe that what @jacqies1 is looking for is errors reported in your console.log. This is where Corona SDK dumps it’s error messages which generally has more information than the popup you might get. It’s really hard to debug your problem without seeing your source code (well the bits of it around the problem, we rarely need the whole project). If you do not know how to get that information, (which is why he asked about Xcode)
Please read this very important blog post, so you can help us help you:
http://www.coronalabs.com/blog/2013/07/09/tutorial-basic-debugging/
Hard to say with no sample of your code but check that you are loading/disposing of your music correctly. It could be a timing issue since the simulator runs much faster then the actual devices, so perhaps the audio is not being loaded in time when on the device.
I suggest you add a few debug print statements in your code, like print(“LOADING SOUND xxx HERE”), etc etc right before you do some audio code (Such as audio.play, audio,stop, audio.dispose)
Then plug your device into your computer and open up xcode.
You should see your device in the list on the left within xcode, then select CONSOLE.
Now run your game and wherever there is a bug or error, the xocde console should show you where in your code is the issue.
If you don’t get any errors then perhaps the format of your audio is incorrect? Check elsewhere on this site for the correct audio.
Sorry thats all i can think of outta my head right now.
Cheers.
Can u tell me where i have to dispose the audio file exactly. More over i am not using xcode.
Actually disposing of audio is only necessary if you have alot of them loaded and need to free up memory. You simply do an audio.dispose(audiofilename);audiofilename=nil (but make sure you stop or check the audiofilename first).
But again if you do this u have to remember to reload the audio in again when u need it. So this is only worthwhile at the end of a level or something, you wouldn’t do this during gameplay.
So load audio files at start of level, then dispose of them when u finish the level. That way any screens in-between have more memory freed.
Yeah you don’t need to be using xcode I also don’t use xcode. BUT, if you want to see why something is not working on your device, then you simply plug the device into your computer, and open xcode software (which must already be on your computer otherwise i don’t think you could even run corona simluator).
Hi @kumarks102. I believe that what @jacqies1 is looking for is errors reported in your console.log. This is where Corona SDK dumps it’s error messages which generally has more information than the popup you might get. It’s really hard to debug your problem without seeing your source code (well the bits of it around the problem, we rarely need the whole project). If you do not know how to get that information, (which is why he asked about Xcode)
Please read this very important blog post, so you can help us help you:
http://www.coronalabs.com/blog/2013/07/09/tutorial-basic-debugging/