KDE’s default sound system is in the stone ages!
In in Software terms it is! And let me explain why.
KDE's default sound subsystems, aRts (Analog realtime synthesizer) has been part of KDE since ages. I really appreciate the quality of lots of software it comes with, however aRts is a real disappointment. Since Windows 98 I believe MS Windows's sound system had the capability of running multiple sound streams at the same time, this is 2007, and one of the most popular window managers for Linux lacks this capability.
I was yesterday running an online video conferencing application, based on Java, and due to some bandwidth issue it wasn't going so well. So I logged into Skype, and guess what? Skype couldn't open the sound device, because it was already engaged by the Java application, hence I could run only one sound application at once. I've been aware of this problem since ages, from a previous Slackware 9.0 experience, however when I encountered the problem again yesterday I was both surprised and shocked how this problem could have gone unaddressed since ages. It turns out that since Dec 2004 development on aRts has been abandoned.
And if your wondering? No! There are many sound subsystems for Linux, which do not have this problem, you can run Amarok on Xine, and play some DVD movies on Xine at the same time, and you'll face no problem or you can run two instances of mplayer without any issue, however mplayer is an application. And there is no way
Fortunately, in the next major KDE release aRts will be replaced by an engine which makes it easier use more capable backends like Xine. In the meantime while KDE 4.0 is not out, we have to bear with aRts!
June 22nd, 2007 - 22:59
I feel your pain brother.
June 23rd, 2007 - 09:12
What works for me is to completely disable the aRts (control center, sound system)and have every application configured to output sound directly to ALSA. aRts can be bypassed for the KDE system notifications also by using a custom player (ie /usr/bin/play in control center, system notifications, player settings).
HTH
June 23rd, 2007 - 09:48
How do you configure Java SDK to output directly to ALSA? And What about Skype?
And the opensuse’s YaST replaces the good old KDE control center, and I’ve been searching, in vain, for a way to disable aRTs.
June 23rd, 2007 - 14:14
If you want to disable aRts using KDE Control Centre, choose “Sound & Multimedia” -> “Sound System”, from there uncheck “Enable the sound system” check box.
June 23rd, 2007 - 14:49
As I have already mentioned, I use OpenSUSE 10.2, and it overrides the KDE Control Center. And I’ve havent seen anywhere where your could disable arts.
June 23rd, 2007 - 19:41
i don’t think that the problem here is with arts but with the way that programs like java or skype access the sound card.
you may access the sound system or access the sound card if an aplication tries to access a sound card wich is busy with the sound system then it will be obvious that it won’t work. They must talk with the sound system!!
I don’t think that any sound system can handle this bad programming behaviour
June 24th, 2007 - 03:23
As far as I can tell, it is false that arTs can not play multiple streams at a time. I have arTs enabled (though “Enable the sound system” checkbox”) am currently playing two songs (as an experiment) using Kaffeine and Amarok. It doesn’t sound great, but it certain works fine. Wikipedia says of arts, “A key component of aRts is the sound server which mixes several sound streams in realtime.” So I don’t know what problem you’re having, but it’s not as fundamental a defect as you make it out to be.
June 24th, 2007 - 03:35
@Matthew
I’ve already said, that Xine does not have the same problem as aRts.
By default Kaffeine uses Xine. Amarok can be configured, and in my installation it came configured with Xine.
June 24th, 2007 - 04:06
Okay, my mistake. It still seems (from what I’m reading) that arTs can do mixing, even if it’s not working in your scenario.
July 4th, 2007 - 13:15
aRts was created at a time when the only sound subsystem provided by Linux was OSS (which required applications to hit a device through /dev/dsp, take control of that file/device, and release it when done).
OSS was still based on the old paradigm of cards that had limited sound mixing capabilities, and which were unable to mix sounds on varying frequencies and sampling (e.g. 22050 Hz in 8-bit from a single application, ending and releasing /dev/dsp, then 16-bit 44100 Hz from another app).
aRts allowed KDE to take control of /dev/dsp, and then KDE apps would hit aRts so that aRts would resample those sound samples and send it to the card as if all aRts-using apps were a single app.
It meant that no other app could access /dev/dsp while KDE was playing back sound (you could program KDE to release the sound device after a fraction of a second, or never), and vice-versa.
Since then, Linux has gained ALSA (with OSS emulation). ALSA allows more modern hardware (able to mix from different sources, with different samplings and rates) to be hit by different apps at the same time, making aRts redundant, within the limits of the hardware (but since most AC’97 codecs can still support more than 32 simultaneous channels, good luck in saturating those).
Skype for Linux now uses ALSA; the only way you could hit a snag is when two apps require simultaneous access to the OSS emulation layer. However, most maintained applications now use ALSA (yes, even XMMS, KDE, Xine and mplayer – but you may need to configure those to use ALSA over OSS).