> Even this isn't perfect. A better way to do splits would be to duplicate the frame at the end of the
> split point, because there is actually another small dependency on the previous frame's windowed
> IMDCT output. So you would want two extra frames at the beginning of the split point, one to hold
> the bit reservoir for the dependent frame, and one for the dependent frame (which also holds the
> bit reservoir for the logical beginning of the split.) The decoder would process these two frames
> but not begin playing audio until the next frame.

This is unfortunately why it's impractical to do gapless mp3 with all the encoders/decoders I've seen. The easiest way (heh) to encode gapless mp3 is to encode the entire segment that you want contiguous as one mp3. At least, the encoder should treat it as one contiguous segment even if it outputs to separate files. In other words, the codec shouldn't be reset between tracks.

This is only half the story though - the decoder also needs to know that the two files are contiguous, and not reset. You can't do this if the tracks weren't contiguous because you'll get a strange result for the first frame of the next track (probably an audible click). So there needs to be some way of telling the codec not to reset in one particular case...

If anyone has a util (source?) to split mp3s, I can try hacking around a bit when I get some time (which I don't have much of, unfortunately :)


- John.

(The above may not represent the views of empeg :)