Gapless playback
Greg Meyer
greg at gkmweb.com
Wed Sep 6 04:08:06 UTC 2006
On Tuesday 05 September 2006 10:52 pm, Greg Meyer wrote:
> On Tuesday 05 September 2006 6:14 pm, gregtr at ihug.co.nz wrote:
> > I'm trying to get gapless playback working with Amarok 1.4.2
> > and xine-lib-1.1.2 with a collection of classical music Ogg
> > Vorbis files.
> >
> > It seems no matter what I do I still get short jerky gaps of
> > about 0.2 seconds appearing between tracks. I know it isn't
> > a problem with the files themselves since ogg123 plays them
> > perfectly, though curiously mplayer and xine exhibit the
> > same problem as amarok.
Well, since amarok uses xine, and xine uses a somewhat hackey method of
supporting gapless in order to support formats that don't support gapless
(like mp3), it would make sense that it happens there. vorbis supports
gapless natively though, so it doesn't surprise me that it works fine with
ogg123. I suspect it still happens with vorbis in xine because xine uses the
same method to provide gapless with all formats rather than use the features
built into vorbis. Maybe we can build an ogg123 engine :)
> >
> > I get the exact same symptoms on Amarok 1.4.2-1 under Fedora
> > Core 5 and Amarok 1.4.1-3 under Debian Sid. A shame since
> > in every other respect Amarok seems to be an excellent music
> > player.
> >
>
> In testing this, I experienced the described problem, so I started checking
> it out. I found that turning off the OSD eliminates the gap.
It seems to be more related to cpu usage as far as I can tell, rather than
anything specific amarok is doing. It happens much less if I turn off all
scripts and the OSD, but it still happens occasionally. Using gkrellm to
monitor cpu usage, there is always a very short spike to 100% on track
change. using ogg123 there is no cpu spike on track change.
Another thing I found, I had much better results using the sound card in my
desktop (TB Santa Cruz) which can do hardware mixing, than with the AC97
codec or USB device on my laptop, although it still occasionally happened.
I'd suggest that it has something to do with dmix, but it also happens when I
bypass dmix and use the ALSA device directly.
So based on my testing, cpu usage seems to be the culprit. Maybe Diego can
comment on my findings since he works on xine-lib.
--
Greg
More information about the Amarok
mailing list