iDevGames Forums
Looping MP3 - Printable Version

+- iDevGames Forums (http://www.idevgames.com/forums)
+-- Forum: Development Zone (/forum-3.html)
+--- Forum: Designer's Studio (/forum-6.html)
+--- Thread: Looping MP3 (/thread-9371.html)



Looping MP3 - Carlos Camacho - Sep 29, 2011 04:13 AM

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


RE: Looping MP3 - ThemsAllTook - Sep 29, 2011 06:18 AM

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...


RE: Looping MP3 - Fenris - Sep 29, 2011 11:36 AM

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.


RE: Looping MP3 - Carlos Camacho - Sep 30, 2011 01:59 PM

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


RE: Looping MP3 - AndyKorth - Sep 30, 2011 03:39 PM

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.


RE: Looping MP3 - HMaudio - Oct 28, 2011 06:47 PM

Ogg is definitely my favorite. I try to push for it when possible, not just for the seamless looping but excellent compression.


RE: Looping MP3 - KomradeJack - Nov 2, 2011 08:20 AM

(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!


RE: Looping MP3 - PythonBlue - Nov 7, 2012 07:54 PM

What Fenris said, which is why I hate mp3 when I need to make loops in my music.