0

I am trying to play audio as i used to do but it seems not working now. These are the codes I tried:

  local birdSound =  audio.loadSound("bird.mp3")
  audio.play(birdSound)

It gives an error like that:

WARNING: Failed to create audio sound

Can you help me out? Thanks.

Figen Güngör
  • 12,169
  • 14
  • 66
  • 108

2 Answers2

1
  1. Don't use .mp3. .wav works for both iphone and android.
  2. Make sure the .wav file is in our folder.
  3. Sometimes some sound file can be played on computer, but not works in simulator. In that case, use other files instead.
  4. If you really like that .mp3 file and can not find .wav, find some free software to convert it.
user1607767
  • 127
  • 6
0

Changing the bit rate(increasing) of my files helped me to solve the problem. Thanks to SatheeshJM!

Figen Güngör
  • 12,169
  • 14
  • 66
  • 108