[PlanetCCRMA] XMMS Skipping on MP3

Kjetil S. Matheussen k.s.matheussen at notam02.no
Wed Aug 13 12:08:17 PDT 2008

Jim Robinson:
> Just wondered if anyone had come across this before....?

Oh yes. :-)

> I have XMMS with mp3 support on a CCRMA FC8 install.  When I try and
> playback MP3's via Jack into Ardour I get skipping.  Not often but
> usually enough times to make it very hard to "play" an mp3 into Ardour
> for recording over (maybe 1 time out of 8 will I get it clean).  I have
> confirmed that this something in XMMS as I can disconnect Jack & Ardour
> and it still does it.   I have also noted that when I close xmms one of
> it's libraries remains resident and I have to manually kill -9 <pid>
> otherwise Ardour gets sad and xruns on me.  All in all something is not
> happy.
> I am not sure what's going on.  I do know that I had to go grab an
> external version of libmad as when I issue this:
> yum install libmad
> It comes back as unknown - although this was a few months back and I
> don't recall where I got libmad from now.
> Just wondered if anyone else had sen this/fixed this or perhaps has
> suggestions as to what would be another Jack "aware" mp3 player I could
> try when "playing" mp3 into Ardour?
> Any advice or thoughts gratefully received.

In case you are using that other xmms jack output plugin,
I have found Gunter Geiger's jack plugin for xmms to work
much better:


But I have also hacked the source a little bit to add realtime
priority to the audio decoding thread:

kjetil at ttleush ~/site/src/xmms-jackasyn-0.3 $ diff -u audio.c~ audio.c
--- audio.c~    2005-11-12 17:40:38.000000000 +0100
+++ audio.c     2008-07-16 16:54:16.000000000 +0200
@@ -530,6 +530,14 @@
         fd_set set;
         struct timeval tv;

+        if(1){
+          struct sched_param par;
+          par.sched_priority = sched_get_priority_max(SCHED_RR);
+          if(sched_setscheduler(0,SCHED_RR,&par)==-1){
+            fprintf(stderr, "SNDLIB: Unable to set SCHED_RR realtime priority for the watchdog thread. No watchdog.\n");
+          }
+        }
         while (going)
                 if (jackxmms_used() > prebuffer_size)

More information about the PlanetCCRMA mailing list