While trying to improve the mp3 gapless playback, I've found the
following problems :
- the gap information from the Xing/Lame header was not used, this
one was known and expected.
- the last mp3 frame was not decoded.
- the output of the mad decoder was not tagged with the right timestamp
- the metronom was buggy, the handling of discontinuity was wrong,
causing problems with short streams (< 5s)
- a bug prevented the wave demuxer to swicth gaplessly
I've created a hg repository and commited all the fixes here :
I've tested gapless playback with the following resources :
A customized sxfe_audio frontend (I've only added the gapless_switch
and early_finish_event flags) :
A set of 6 short wave files with no gap :
The same files encoded with lame :
wave files play really gaplessly.
mp3 files play gaplessly but with an audible crack, it's better than
current lib, but not perfect, i will do more investigations to
determine if it's really engine's fault.
Please test and report problems if you're not happy with the current
status of xine-lib gapless playback.