Hi everybody! I've been trying to make my KDE setup run without artsd. The high-level reason for this is that I don't want to have this daemon wasting resources while ALSA can do the same thing with the dmix plugin. Further, sound quality with OSS-only fullduplex applications (e.g. skype) running with artsdsp is poor and I specifically do not want to go down the path of madness of having to manually tweak buffering parameters at multiple levels. For most KDE applications it's relatively straightforward to play sound without aRts as there are either ALSA or gstreamer backends (so I'm in fact trading aRts for gstreamer in some places, but for the moment that's OK). The one thing that's giving me troubles are the KDE system notifications. You get to specify an external player, but which one to use given that input files will be in WAV and OGG formats and possibly others? The main goal still remains to reduce overhead as much as possible. Well, there are two options: aplay and gst-launch-0.8, both from Debian testing. aplay handles WAV nicely but has no clue about compressed formats. gst-launch-0.8 handles all kinds of formats, ironically NOT WAV (at least on my machine it plays WAVs too fast and sometimes just sleeps forever without doing anything). Bug report is pending. So I've written the following script to be used as external player for KDE system notifications: #!/bin/sh if [ "$(echo $1 | awk '/\.wav$/ {print $1}')" ] ; then aplay -q -t wav $1 exit fi if [ "$(echo $1 | awk '/\.mp3$/ {print $1}')" ] ; then gst-launch-0.8 filesrc location="$1" ! mad ! alsasink > /dev/null exit fi if [ "$(echo $1 | awk '/\.ogg$/ {print $1}')" ] ; then gst-launch-0.8 filesrc location="$1" ! oggdemux ! vorbisdec ! audioconvert ! alsasink > /dev/null exit fi gst-launch-0.8 filesrc location="$1" ! spider ! alsasink > /dev/null This effectily uses aplay for WAV and gst-launch-0.8 for everything else. Yes, all three calls to gst-launch-0.8 produce the same result and could be replaced by just one, but I'd like to keep things seperate for now. This setup is working fine for me. I get all the sound and all the software mixing and none of the aRts problems, with just ALSA/dmix and gstreamer in some places. Now, my question is: What are your thoughts about this? Is this the way to go? Is there any more elegant way to run KDE without aRts? Looking forward to your feedback, Georg -- Georg Wittenburg http://page.mi.fu-berlin.de/~wittenbu/
Attachment:
pgpekNO1WYAdK.pgp
Description: PGP signature