iDevGames Forums

Full Version: Looping MP3
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
When I save my AIFF or WAV to MP3, the resulting MP3 has a gap at the start and end. I open the MP3 and remove the gap and resave. Gap is inserted again. Seems like Audacity and even Peak insists on this. What are you using to save MP3 without gaps? Also, for game quality sound, what is your recommendation for MP3 quality setting?

Cheers
I'm able to save a gapless MP3 with Amadeus Pro, though it'll cost you money. From what I've read, gaps are a pretty common problem when saving MP3s. I don't know all of the details, but some developers avoid the format because of them. Maybe AAC or Vorbis would work better for you?

As for quality, I usually use 192, but that's fairly arbitrary...
The trick is that MP3:s consist of a number of audio frames of a certain length, and if your "trimmed" audio isn't exactly filling up the last frame, you're going to get a shard of silence in the end of the last frame.

Calculating the frame size is trivial (google it). See how many frames make up your audio, and if it doesn't even out, make your audio a little longer or shorter.

Getting a clean join in the audio samples is less important than filling the last frame.
i ran across a small app for windows to help with looping
But I'm not keen to have to run it each time
It seems all audio editors will have the gap due to what Ivan mentioned
We use ogg. Unless your sound is extremely short, we've run into no trouble with oggs. Most people find it easier to use because of better APIs, and there are fewer licensing concerns around it.
Ogg is definitely my favorite. I try to push for it when possible, not just for the seamless looping but excellent compression.
(Oct 28, 2011 06:47 PM)HMaudio Wrote: [ -> ]Ogg is definitely my favorite. I try to push for it when possible, not just for the seamless looping but excellent compression.

Yes, when possible go OGG!
What Fenris said, which is why I hate mp3 when I need to make loops in my music.
Reference URL's