Febs
Headphoneus Supremus
- Joined
- Mar 25, 2005
- Posts
- 2,853
- Likes
- 12
Quote:
Yes. This FAQ from the Rockbox website explains why Rockbox can play LAME files gaplessly even though MP3 is not a natively gapless format:
Quote:
I suspect that Apple's gapless implementation works in a similar fashion.
Originally Posted by elnero /img/forum/go_quote.gif It's been my understanding that MP3 is not a natively gapless codec, are Lame and iTunes doing something to the codec to make it truly gapless or is it that the implementations of gapless require specific conditions to work properly? |
Yes. This FAQ from the Rockbox website explains why Rockbox can play LAME files gaplessly even though MP3 is not a natively gapless format:
Quote:
MP3s were not designed to be played back gaplessly; this is a limitation inherent in the MP3 format. MP3 stores data in frames that contain 1152 samples (48/44.1/32 kHz sample frequency) or 576 samples (24/22.05/16/12/11.025/8 kHz sample frequency). Since the length of a song rarely corresponds exactly to a whole number of frames, MP3 encoders "pad" the end of the final frame in the song with additional samples. Unfortunately, most MP3 encoders do not store any information indicating what is padding and what is supposed to be part of the song. Thus, it is impossible for an MP3 decoder to play back an MP3 file gaplessly with two exceptions: (1) LAME 3.90.1 and higher stores information about the exact file length in the header (the LAME tag), thus allowing us to calculate which parts of the final frame are padding and to disregard those samples on playback. (2) LAME and maybe other encoders allow to encode an album in a way that the song ends are slightly shifted to end up exactly on frame boundaries (the LAME -nogap method; the shift is max. 1/2 frame length, i.e. usually not noticeable). These files can be played gapless regardless whether the player handles the LAME tag or not. Note that some MP3 players implement a psuedo-gapless playback using one of a couple of methods of cheating. Some players which claim to be gapless will actually do a very short crossfade between the end of one song and the beginning of the next. Other players cut off any zero data (or near zero data) in the final frame of an MP3. This method, which is sometimes referred to as "gap detect" or "gap delete," is not truly gapless, because (1) is it not accurate, and (2) it will cut off silence that is supposed to be at the end of a track. "Gapless" will play back MP3s of a CD the way the mastering engineer intended it to be; "gap detect" or "gap delete" will not. For example, if the mastering engineer decided to put a 2-second gap between one song and another on a CD, true gapless playback will retain that 2-second gap, whereas gap detect or gap delete will not. Rockbox uses gapless playback, not gap detect or gap delete. What does all this mean? Basically, Rockbox will play back LAME-encoded MP3s either gaplessly or very nearly gaplessly. However, MP3s encoded with other encoders will play back with a small but noticeable gap. |
I suspect that Apple's gapless implementation works in a similar fashion.