Gapless playback

From Hydrogenaudio Knowledgebase
Revision as of 04:52, 14 April 2005 by 222.98.194.47 (talk) (My own rewrite. Duplicated from Wikipedia)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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