

By this definition, a precise gapless player is not allowed to introduce either gaps or overlaps (crossfading) between successive tracks, and is not allowed to use guesswork.Īpart from accounting for playback latency, the preciseness here lies in treating lossless data as-is, and removing the correct amount of padding from lossy data. Ways to eliminate the gaps Precise gapless playback Īs opposed to heuristic techniques, what is often meant by precise gapless playback, is that playback timing is guaranteed to be identical to the source. The latter is more flexible, but has the drawback of inserting approximately 2 seconds of silence between tracks. Main article: Optical disc recording modesĪudio-CDs can be recorded in either disc at once (DAO) or track at once (TAO) mode. Even if two tracks are decompressed and merged into a single track, a pause will usually remain between them. Also, the encoder delay may vary from encoder to encoder, making automatic removal difficult. The popular MP3 format defines no way to record the amount of delay or padding for later removal. Other formats may require extra metadata for the player to achieve the same. Ogg Vorbis), where the start and end are precisely defined, the padding is implicitly trimmed off in the decoding process. Lossless formats are not prone to this problem.įor some audio formats (e.g.

If not trimmed off upon playback, the two silences played consecutively over a track boundary will appear as a pause in the original audio content. These silences increase the playtime of the compressed audio data. Lossy audio compression schemes that are based on overlapping time/frequency transforms add a small amount of padding silence to the beginning and end of each track. Most recent players and newer versions of old players now support gapless playback directly. Some of these rely on third-party gapless audio plug-ins to buffer output. Many older audio players on personal computers do not implement the required buffering to play gapless audio. The two decoded pieces of audio must be fed to the hardware continuously over the transition, as if the tracks were concatenated in software. To account for the whole chain of delays, the start of the next track should ideally be readily decoded before the currently playing track finishes. In extreme cases, the hardware is even reset between tracks, creating a very short "click". The gap can be as much as half a second or more - very noticeable in "continuous" music such as certain classical or dance genres. If not accounted for, the listener is left waiting in silence as the player fetches the next file (see harddisk access time), updates metadata, decodes the whole first block, before having any data to feed the hardware buffer. Various software, firmware and hardware components may add up to a substantial delay associated with starting playback of a track.
