Device Testing

Hi, Im building this game where cannon ball hit a plane and it explodes. The background sound is playing on my HTC one android phone when I am testing but the button click sound and explosion sound s not working on the phone. Everything seems pretty good in the corona simulator. Please let me know what are the possible problem could be and soluions. Thanks. Is it anything to do with the build settings file?

code from the project below


–Function for Collision

   local  function onCollide (event)
if(event.phase == “began”) then
explosion47()
system.vibrate()
distroyPlane47()
scorePoint()
media.playEventSound( “audio/level-001/explosion.mp3”,true ) – this one is not working! on android
end

Are you pre-loading the sound?  See the gotcha’s here:

http://docs.coronalabs.com/api/library/media/playEventSound.html

Rob

I first tried the    media.newEventSound also  and it ididn’t work but

when I replaced the following line of code

media.playEventSound( “audio/level-001/explosion.mp3”,true )

with this another function

local distruction = audio.play(audio.loadSound(  “audio/level-001/explosion.mp3”))

it started working on my device.

Thank you very much for the reply and effort anyway.

Are you pre-loading the sound?  See the gotcha’s here:

http://docs.coronalabs.com/api/library/media/playEventSound.html

Rob

I first tried the    media.newEventSound also  and it ididn’t work but

when I replaced the following line of code

media.playEventSound( “audio/level-001/explosion.mp3”,true )

with this another function

local distruction = audio.play(audio.loadSound(  “audio/level-001/explosion.mp3”))

it started working on my device.

Thank you very much for the reply and effort anyway.