wav vs. mp3 (and other formats)

Is there some reason for me to use .wav vs .mp3 files in the app? I just checked and the same exact sound effect takes ~200K in mp3 form and ~1.2M in wav form (and ~1.2M in aiff form). If the difference is 6 times in file size, why would anyone use .wav or .aiff in their apps? [import]uid: 160496 topic_id: 29074 reply_id: 329074[/import]

No, not really. I think .wav files have higher fidelity but for someone listing on a devices tiny speakers, that just doens’t matter.

[import]uid: 19626 topic_id: 29074 reply_id: 116997[/import]

Before I started using Corona I noticed that when looping mp3s I was more prone to getting a slight clip on the loop. Switching to wavs helped with that. I thought it was just the tools I had at the time but after switching to Corona I found this in their documentation.


“Looping
Beware that certain formats (particularly highly compressed lossy formats like mp3, aac, ogg vorbis) can pad/remove samples at the end of an audio sample and potentially break a “perfect-looping” clip. If you are experiencing gaps in looping playback, try using WAV and make sure your lead-in and ending points are clean.”

(http://developer.coronalabs.com/partner/audionotes)

In any case, I would always use a compressed format over wav’s unless I ran into the above issue. [import]uid: 147305 topic_id: 29074 reply_id: 117019[/import]

After 24 hours of messing around with mp3s and researching their encoders I came to the same conclusion - you needs WAVs for smooth seamless looping. Then found this post confirming what I had learned. If anyone wants to see the technical explanation of what’s wrong with mp3 (and a possible rather technical work around) look here:

http://lame.sourceforge.net/tech-FAQ.txt

It’s in the context of the LAME decoder but it pertains to mp3s in general.

You can loop files with mp3s if they have naturally have silence in the start and end of the loop, but something like a continuous drone needs a WAV. [import]uid: 130188 topic_id: 29074 reply_id: 126454[/import]

.
[import]uid: 130188 topic_id: 29074 reply_id: 126455[/import]

true, I found the same thing. But non-looping sound FX can be mp3, and the savings in storage justify having all of the non-looping ones in mp3. [import]uid: 160496 topic_id: 29074 reply_id: 126463[/import]

I am using M4A files and have not had any problems with looping files. Have you tried that format? [import]uid: 17827 topic_id: 29074 reply_id: 126470[/import]

I haven’t tried M4A. Thanks for the tip!

Is it supported on all corona supported devices - iOS, Android and the Android derivatives (kindle, nook etc.)? [import]uid: 130188 topic_id: 29074 reply_id: 126519[/import]

It is my understanding that unprotected M4A files do play on most Android devices, including the Kindle Fire and Nook devices, as well as iOS devices. Someone please correct me if they know that some devices do not support MPEG-4 files.

I use the open source audio editor Audacity with the FFmpeg library installed to export M4A files.

I should also say that I am using it for background music only, so it is possible that it could have the problems mentioned for MP3 and I have not noticed it, but it is worth a try since you can do it for free. [import]uid: 17827 topic_id: 29074 reply_id: 126600[/import]

After 24 hours of messing around with mp3s and researching their encoders I came to the same conclusion - you needs WAVs for smooth seamless looping. Then found this post confirming what I had learned. If anyone wants to see the technical explanation of what’s wrong with mp3 (and a possible rather technical work around) look here:

http://lame.sourceforge.net/tech-FAQ.txt

It’s in the context of the LAME decoder but it pertains to mp3s in general.

You can loop files with mp3s if they have naturally have silence in the start and end of the loop, but something like a continuous drone needs a WAV. [import]uid: 130188 topic_id: 29074 reply_id: 126454[/import]

.
[import]uid: 130188 topic_id: 29074 reply_id: 126455[/import]

true, I found the same thing. But non-looping sound FX can be mp3, and the savings in storage justify having all of the non-looping ones in mp3. [import]uid: 160496 topic_id: 29074 reply_id: 126463[/import]

I am using M4A files and have not had any problems with looping files. Have you tried that format? [import]uid: 17827 topic_id: 29074 reply_id: 126470[/import]

I’ve been considering a project that would make heavy use of looped audio so this thread has been helpful. Thanks for the input [import]uid: 105707 topic_id: 29074 reply_id: 126698[/import]

I haven’t tried M4A. Thanks for the tip!

Is it supported on all corona supported devices - iOS, Android and the Android derivatives (kindle, nook etc.)? [import]uid: 130188 topic_id: 29074 reply_id: 126519[/import]

It is my understanding that unprotected M4A files do play on most Android devices, including the Kindle Fire and Nook devices, as well as iOS devices. Someone please correct me if they know that some devices do not support MPEG-4 files.

I use the open source audio editor Audacity with the FFmpeg library installed to export M4A files.

I should also say that I am using it for background music only, so it is possible that it could have the problems mentioned for MP3 and I have not noticed it, but it is worth a try since you can do it for free. [import]uid: 17827 topic_id: 29074 reply_id: 126600[/import]

I’ve been considering a project that would make heavy use of looped audio so this thread has been helpful. Thanks for the input [import]uid: 105707 topic_id: 29074 reply_id: 126698[/import]

Nice. Thanks for the info guys.

Nice. Thanks for the info guys.