Ahh, for those of you who haven't yet tired of my quixotic quest for truly perfectly gapless playback, I have succeeded in getting WinAmp to do it perfecly. At least I think I have---I sure as heck can't hear even the slightest blip between tracks with this setup. I consider this a "proof of concept" that hopefully can make it into Empeg one day.

OK, here is the way I did it. First, you have to produce your gapless MP3 files. I do this as follows:
1. Rip the entire album as a single WAV file. If you use EAC's "Copy Image & Create CUE Sheet" function, it will create an accompanying CUE file which lists the locations of the track boundaries. This file is needed later.
2. Encode the entire album with your favorite encoder. I use LAME 3.86beta. Note: If you use VBR, use the "-t" option to tell LAME not to generate a Xing VBR header. If you leave the header there, it will convince your MP3 player that the first track is as long as the entire album. It will likely play correctly, but the time scale will be way off.
3. Split the MP3 file into pieces using musiCutter 0.4. musiCutter uses the CUE sheets described above to know where to split the file; and it is very careful to cut along frame boundaries.
4. Name and order them as you would like. However, don't add any ID3 tags. I'm not sure why, but I still get slight gaps when ID3 tags are present---perhaps the system inserts a blank frame while it's searching past the ID3 tag. If so, then likely a fix to the MP3 decoding plugin would take care of that, but again this is only a proof of concept.

Now, to set up the MP3 player, I used:
1. WinAmp 2.65
2. The "Dudsoft Gapless Playback" plugin, downloadable from the WinAmp web site.
3. A slightly modified version of Shibatch's mpg123 plugin. I've attached my mofiication above, it's about a 2-3 line change to a single source file. If you want the binary, e-mail me; I can't attach it here since it's too big. I actually had to remove or rename the original "in_mp3.dll" MP3 decoder from the Winamp/Plugins directory to get Winamp to use this one by default.

The "in_mpg123.dll" plugin uses the LAME mpeg decoder, which according to this analysis is a significantly more accurate decoder than the one that ships with WinAmp.

My modification prevents the MP3 decoder from "resetting" between files. As a result, the decoder actually sees the split MP3 files as one large file. This is important because individual MP3 frames are not necessarily independent of each other. So, the last few frames of, say, track 1 contain information about the first few frames of track 2. The amount of information stored in track 1 will depend on the music and the encoder. The idea is that a very complicated frame can "borrow" bytes from surrounding, less complicated frames so that the overall fidelity of the MP3 file is preserved.

You won't be able to hear the data loss if you were to start playback at track 2, no more than you can hear the data loss if you seek to the middle of a track. But, when track 1 and track 2 are played consecutively, you will often hear a blip if the MP3 player is "reset" between the tracks. The more information is shared between tracks, the worse the blip.

This modification should not affect the sound quality of normal MP3 files. This is because two MP3 files that were not split from one large file will not share any information about each other.

Anyway, I hope I've documented what it takes for you to try this out and see for yourself. And, I hope that this experiment provides enough information that we might be able to see a similar modification in, say, version 1.1 or 1.2? I think I've demonstrated that it should be relatively simple to achieve.


Michael Grant
12GB Green
080000266

Edited by mcgrant on 8/9/00 08:36 AM.



Attachments
8-16233-in_mpg123d.cpp (194 downloads)

_________________________
Michael Grant 12GB Green 080000266