No Audio on Device

Hi arog
Yes, it looks like with wav-files everything is working good. But now i’m facing other issue - I’ve converted some of my mp3-s tp wav-s and tried to build my app. as the result I’ve got a “Build failed” error message and any info in the console. I presume the problem is in my wav-s - maybe format/compression is unsupported or something like this. Is there any requirement about what compression type should be? [import]uid: 31161 topic_id: 4855 reply_id: 28878[/import]

Make sure you don’t have any files with the same basename, e.g. boom.mp3 and boom.wav. Android hates this and causes builds to mysteriously fail.

[import]uid: 7563 topic_id: 4855 reply_id: 28881[/import]

Hi ewing
Thank you for this tip - I’ll check it right now [import]uid: 31161 topic_id: 4855 reply_id: 28886[/import]

I’ve checked it once again: mp3-s removed from the folder, only wav-s are their - build failed. Any suggestions what could it be?
P.S. Ansca guys, please do something with the sound on Android - at least make it working with mp3-s, please!!! [import]uid: 31161 topic_id: 4855 reply_id: 28887[/import]

If the build fails, that is not a sound problem…that is a build problem.

Make sure you don’t have any other duplicate resource files, e.g. images.

MP3s should work. I recommend you start small with a simple two line project to verify.

[import]uid: 7563 topic_id: 4855 reply_id: 28892[/import]

I have .WAV and .OGG files working on Android

Two things that I found were:

  • WAV files cannot be in sub-folder
  • WAV files need to be at a higher bit-rate when converted or they did not work

I have not retested .MP3’s since build .268 (but probably same as above where the sound files cannot be in sub-folder)

Try it and let me know. I hope it helps.

[import]uid: 10965 topic_id: 4855 reply_id: 28901[/import]

Hi ewing
It’s pretty strange - I’ve tested mp3-s several times (BTW I’m using Cropna for Win - maybe this is the case?) and they don’t work :frowning:
But anyway i’ve solved the problem: I’ve converted all my sounds to wav-s so they dont require any codecs or anything else to play and now it works. BTW it looks like the bitrate can be any we need - I’ve checked even with the lowest quality and it works fine on Android.
So the problem is solved - thanks everyone! :slight_smile: And waiting when mp3-s will be supported!
[import]uid: 31161 topic_id: 4855 reply_id: 28905[/import]

OK finally got some success.
Converted my mp3 to .wav file (22 16bit Stereo, PCM uncompressed)and built using version 2011.377 on windows and it works…hurrah.
There is the delay problem still but at least I now have something.
Hopefully the delay and MP3 format will be sorted soon (please Ansca :slight_smile: )
[import]uid: 40581 topic_id: 4855 reply_id: 28907[/import]

g.harrison, the same issue :slight_smile:
So, Ansca, desperately waiting for solutions!! [import]uid: 31161 topic_id: 4855 reply_id: 28909[/import]

hello, the wav file is not an acceptable solution.
I have long soundtracks and, converted in wav they will be too large to work on …
On iPhone i use mp3 format ant a soundtrack takes max 5mb. the same soundtrack keeps more than 30Mb in wav format and causes the app to crash after installation …
Finally builds after 268 works only for version 2.2 of android … so when a stable release will be here? [import]uid: 42752 topic_id: 4855 reply_id: 31705[/import]

MP3 and Ogg support for Android are in the current daily builds.
The next stable release should be real soon.

[import]uid: 7563 topic_id: 4855 reply_id: 31730[/import]

well, i’m having trouble with sound too… :frowning:
previously i was only testing on Windows&Mac in the simulator, and the wav format didn’t work on Android. So i switched to MP3 and it works fine on Android and simulator (on mac and pc).
But now i have uploaded it to my IPad for testing, and there is no sound :frowning:
I use the following code:
[lua]local bump
bump = media.newEventSound(“bump.mp3”)
–and when i need the sound to be played, i use:
media.playEventSound( bump )[/lua]
Is this a MP3 problem or something is wrong with the code? [import]uid: 44010 topic_id: 4855 reply_id: 34359[/import]

The problem is media.play*Sound is really limited and you shouldn’t be using that API if you can avoid it. Use the audio.* API instead.
[import]uid: 7563 topic_id: 4855 reply_id: 34477[/import]

But the audio.* API is still not as usable on Android as it is on iOS. Playback is still delayed and that’s why I’m also using media.play on Android and have a default “if-switch” in my games to determine what function to use for playback depending on platform.
[import]uid: 11219 topic_id: 4855 reply_id: 34517[/import]