art with code

2009-02-02

Caught on Last.fm, also some OSS config

9mm Parabellum Bullet - Japanese rock, Star One - prog rock, Кино - Soviet rock, Mumiy Troll - Russian rock

If you wish to use OSS4 on Fedora 10 Rhythmbox with Intel HDA integrated sound:
  1. download and install the rpm, fiddle with ossxmix to mute all line-ins and to maybe fix the jack mappings
  2. yum erase pulseaudio
  3. Use gconf-editor to change system/gstreamer/0.10/default *audiosink etc. to osssink (they default to autoaudiosink, which necessitates audioresample and 30% cpu use. You don't want that.)
  4. vmixctl rate 44100 /dev/dsp to make the OSS vmix take 44100 Hz audio (which most of your audio is)
  5. Oh hey, now Rhythmbox uses only 2% CPU instead of 6% it used with Pulseaudio. And it doesn't skip either. And you can play several sounds at once! Welcome to a Windows computer circa 1995.

Alternative for steps 3-5:
  • Use gconf-editor to change the *audiosink to speexresample ! audio/x-raw-float,rate=48000 ! audioconvert ! oss4sink (speexresample uses 6% cpu, same as Pulseaudio (as it uses speex as well))


(Why are Pulseaudio, artsd and esd a bad idea? Because they try to solve a driver-level problem by adding a new driver on top, instead of fixing the driver.

It's like you had a network driver that allowed only one process to use it at a time, and people scrambled to provide multiplexers that add a userspace daemon that let several programs access the network concurrently. And they don't bother to make them fast or low-latency. Or compatible.

So you have PulseIP, eIPd and artIPd, and every app must decide which one to support, or take a leap of faith and trust that the network driver does non-exclusive network access. And there are two driver APIs, the Open IP System and the Advanced Linux IP Architecture, both incompatible, you need to choose which one to use.

Retarded? Yes. How about just fixing the driver? Which, as it happens, is what OSS4 does.

There are some benefits to user-space sound daemons you say? Network-transparent audio? Application-specific volume control? While nice, they're not vital. What really matters is that basic audio works right.

And you should do the fancy stuff iptables-style, i.e. with a transparent sound shaper between the driver and the applications. Push the solutions down the stack, that way more people can benefit from them.)

No comments:

Blog Archive