Gapless playback: Difference between revisions

From Hydrogenaudio Knowledgebase
(My own rewrite. Duplicated from Wikipedia)
 
Line 24: Line 24:
==See also==
==See also==
* [[Ogg]] [[Vorbis]]
* [[Ogg]] [[Vorbis]]
* [[WavPack]]

Revision as of 18:18, 17 July 2005

Gapless playback is the seamless playback of digital audio formats. It allows live music or consecutive tracks to be heard exactly as they are mastered, without gaps between tracks.

Why gaps occur

Most lossy audio compression schemes involve a frequency/time domain transform. The playtime of the audio data may not be equal before and after the compression.

Most audio playback software also closes the audio output streamed to the soundcard when switching tracks. This can introduce gaps also.

Optimal solution

It is possible to store metadata in the audio to explicitly declare the playtime, and/or the delays introduced in the encoding process. This information can be used to ensure that playtime will remain constant after decoding.

The audio playback software must be able to recognize the metadata, and trim the decoded audio as necessary.

The software can then take care to keep the output stream open between tracks.

Alternative solutions

DSP plugins can be used to detect silence between tracks and trim the audio as necessary on playback. This is not immune to error however, and is not optimal.

DSP plugins can also be used to crossfade between tracks, but this is not always desirable.

Gapless solutions

See also