Sound formats for corona-supported devices

Hi,
I’ve switched from the iOS development to more universal builds. So now I want to make the corona-coded game run on Android platforms.
I found problems with sounds though.

On iOS I was using AIF sounds (AIFC to be exact), and afinfo on my Mac shows the following info for those files:

File: Waterfall.aif  
File type ID: AIFC  
Num Tracks: 1  
----  
Data format: 2 ch, 44100 Hz, 'ima4' (0x00000000) 0 bits/channel, 68 bytes/packet, 64 frames/packet, 0 bytes/frame  
Channel layout: Stereo (L R)  
estimated duration: 1.828571 sec  
audio bytes: 85680  
audio packets: 1260  
bit rate: 374850 bits per second  
packet size upper bound: 68  
maximum packet size: 68  
audio data file offset: 118  
optimized  

But on the Android device I get no sound at all from those files.

I tried experimenting with different formats, sometimes app crashes (when I used some weird options while converting to WAV), but using 16 bit Little Endian format for Wav - I managed to get the app play the sounds. But it got up in size from ~50MB on iOS (with AIF sounds) up to ~180MB with WAVs.

afinfo shows the following with the new WAVs:

File: Waterfall.wav  
File type ID: WAVE  
Num Tracks: 1  
----  
Data format: 2 ch, 44100 Hz, 'lpcm' (0x0000000C) 16-bit little-endian signed integer  
 no channel layout.  
estimated duration: 1.828571 sec  
audio bytes: 322560  
audio packets: 80640  
bit rate: 1411200 bits per second  
packet size upper bound: 4  
maximum packet size: 4  
audio data file offset: 4096  
optimized  
source bit depth: I16  
----  

What’s the preferred format (file and data format) to use on Android devices? By that I mean both the ‘regular’ android as well as Nook/Kindle Fire - as I tested some time ago, the Nook didn’t play ogg/mp3 sounds that my Galaxy Tab now can play… [import]uid: 120659 topic_id: 33501 reply_id: 333501[/import]

Corona is supposed to support 2 cross-platform formats for Audio: .wav(Uncompressed Audio), and .mp3(Compressed Audio). iOS doesn’t have a .ogg hardware decoder, and so is frequently not supported on iOS by many engines.
Source for formats: http://developer.coronalabs.com/partner/audionotes

It seems odd the Nook couldn’t handle .mp3, and that definitely puts a wrench in the gears (especially if you have 180 mb of Audio, or a few really long tracks). A particularly standard mobile audio design is to have 1 longer streaming track (music, or ambience) as an mp3 for memory savings, and your standard SFX as .wav for CPU performance (decompressing more than 1 audio track at 1 time is expensive, but on most devices 1 track is virtually free, due to smartphones doubling as mp3 players and having hardware decoders), but if you can’t get mp3 working, you have a lack of a universal compressed audio format. Were you able to get other formats playing on the Nook/can you guarantee the format was the issue? [import]uid: 134101 topic_id: 33501 reply_id: 133082[/import]

As mentioned above, the Audio Notes page talks about the supported formats. I don’t recommend you use .aif and you are better off with .wav, even on iOS. (AIF is generally big endian, not little endian so additional byte swapping has to be done.)

Nook, Kindle, and regular Android all use the same decoder backend in Corona. So if it works in one, it should work in all of them. I’ll speculate that you ran out of memory on your Nook and the audio files refused to load. (Check your adb log.)

[import]uid: 7563 topic_id: 33501 reply_id: 133096[/import]

Actually, the Nook does support MP3 files. You can find what audio formats and codecs are supported on B&N’s website. Have a look at these links…
https://nookdeveloper.barnesandnoble.com/product/nook-color-specs.html
https://nookdeveloper.barnesandnoble.com/product/nook-tablet-specs.html
https://nookdeveloper.barnesandnoble.com/product/nook-device-specs.html

Just be aware that the older Nook Color does not support as many codecs as the newer models. [import]uid: 32256 topic_id: 33501 reply_id: 133098[/import]

Corona is supposed to support 2 cross-platform formats for Audio: .wav(Uncompressed Audio), and .mp3(Compressed Audio). iOS doesn’t have a .ogg hardware decoder, and so is frequently not supported on iOS by many engines.
Source for formats: http://developer.coronalabs.com/partner/audionotes

It seems odd the Nook couldn’t handle .mp3, and that definitely puts a wrench in the gears (especially if you have 180 mb of Audio, or a few really long tracks). A particularly standard mobile audio design is to have 1 longer streaming track (music, or ambience) as an mp3 for memory savings, and your standard SFX as .wav for CPU performance (decompressing more than 1 audio track at 1 time is expensive, but on most devices 1 track is virtually free, due to smartphones doubling as mp3 players and having hardware decoders), but if you can’t get mp3 working, you have a lack of a universal compressed audio format. Were you able to get other formats playing on the Nook/can you guarantee the format was the issue? [import]uid: 134101 topic_id: 33501 reply_id: 133082[/import]

As mentioned above, the Audio Notes page talks about the supported formats. I don’t recommend you use .aif and you are better off with .wav, even on iOS. (AIF is generally big endian, not little endian so additional byte swapping has to be done.)

Nook, Kindle, and regular Android all use the same decoder backend in Corona. So if it works in one, it should work in all of them. I’ll speculate that you ran out of memory on your Nook and the audio files refused to load. (Check your adb log.)

[import]uid: 7563 topic_id: 33501 reply_id: 133096[/import]

Actually, the Nook does support MP3 files. You can find what audio formats and codecs are supported on B&N’s website. Have a look at these links…
https://nookdeveloper.barnesandnoble.com/product/nook-color-specs.html
https://nookdeveloper.barnesandnoble.com/product/nook-tablet-specs.html
https://nookdeveloper.barnesandnoble.com/product/nook-device-specs.html

Just be aware that the older Nook Color does not support as many codecs as the newer models. [import]uid: 32256 topic_id: 33501 reply_id: 133098[/import]