Problem with audio on Android. Wav file not playing.

Hi,

I’m about to complete my first multi-platform game with the Corona sdk. I just created a audio track for the music. Until now, I used a placeholder from Corona’s tutorial and it played fine.

Now I had replaced the .wav with my own. It plays perfectly on PC, but when I build for Android, once I’ve installed the app, it does not play on device.

I had other sounds in the app and they play fine.

I had tried the following:

  • Changing it’s channel
  • Not assigning it to any channel
  • Playing with the volume of the channel
  • audio.loadsound instead of audio.loadstream
  • changing the location of the file to the root of the project

Nothing worked. My wav sound effects played correctly on Android but not the music track.

I suspected it may be due to the wav format. So I researched and noticed I had exported my audio in 32-bit. Mobile devices allowed only 16-bit audio .wav. So I reexported and it works.

Since I didn’t find the answer on the forum, I drop this bit here so that if someone else has the same problem, they will save an hour of their life by finding their solution more quickly than I did through a forum or google search.

Thank you for providing an answer!  Ths is useful!

Rob

Thank you for providing an answer!  Ths is useful!

Rob