Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Hint: XMMS with -ck sources
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
fasaxc
n00b
n00b


Joined: 12 Jul 2004
Posts: 8

PostPosted: Mon Aug 16, 2004 11:54 am    Post subject: Hint: XMMS with -ck sources Reply with quote

Here's a script to enhance XMMS with the -ck sources (or any that support SCHED_ISO). Put this code somewhere like ~/bin/set-xmms-priority.sh
Code:

#!/bin/sh
ps -A | grep xmms | gawk '{ system("schedtool -I " $1) } '


You need to
Code:
emerge schedtool
first though.

Now open XMMS got to Options->preferences->General Plugins->Song Change->configure and enter the location of the script "~/bin/set-xmms-priority.sh" in the on change song box. Click OK then make sure you check 'Enable Plugin'.

Enjoy XMMS without any skips, ever.

The script puts XMMS in the isochronous scheduling band with a supported kernel -- this gives XMMS a guaranteed amount of time on the cpu without hogging it (ie exacltly what it needs!) -- you dont have to be root either, it cant take over the machine.

NB. you could probably put the whole one liner in the xmms box itself. Setting xmms's priority once is not sufficient as the setting is lost on restart (which KDE does automatically when restoring session for example).

-Shaun
Back to top
View user's profile Send private message
ravageNG
n00b
n00b


Joined: 29 Jul 2003
Posts: 46

PostPosted: Wed Feb 16, 2005 9:01 am    Post subject: Reply with quote

A more generic solution seems to be scheD:
http://www.darav.de/sched.html.

Quote:
What's scheD?
-------------

It's a very simple daemon to renice/nice and change priorities of processes while
running them. It's done via schedtool.

My intention writting scheD was to get audio played propably (via xmms, rhymthbox
or realplayer) on my iBook. The problem was audio stutters when I started MOL
(Mac-On-Linux), because of MOL takes the highest priority on my system. Setting
xmms and others to SCHED_ISO works very well. scheD does it for you, always when
starting these programms. No interaction required.

Another example is, to let emerge/qpkg/apt-get/... to be batched (SCHED_BATCH) - so
your "normal" work isn't disturbed.

Also it seems usefull to batch kio-slaves (for instance mp3 conversation) to get a
more responsible KDE (was reported by Jos).
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum