A while back, I got really annoyed from the fact that when I was running Gentoo and I decided to play a game (Wine/Cedega) like EVE Online, I either have the sound from EVE-Online, or from my desktop – but not both.
This is usually due to a crappy sound card (no hardware mixing) and a driver which fails to fix this. I knew ALSA had dmix for software mixing but I read somewhere that pulseaudio was the new hot shot in the mixing scene. I was wrong.
You see, after enabling pulseaudio in Gentoo, rebuilding a number of packages to support it (Xine-lib for example) and following the guides to make ALSA-only applications use pulseaudio as well (in fact by looping the sound back from ALSA to pulse and again to ALSA), it should just work ™.
My first attempts were fine, I used aplay to select the pulse channel, played 6 songs at once and all was well. When it was time to make Phonon (KDE4) use the new pulseaudio sink, nothing happened. I even used the workaround as explained on the pulseaudio page – but nothing helped. I finally made the default audio-sink pulseaudio.
Next up: Wine. The first attempt to start Winamp went fine, except for the fact that I didn’t hear no sound. Looking in the logs, I see wine attempting to open the ALSA/Pulseaudio library from ‘/lib32’. For the more perceptive of you: yes, it want 32-bit libraries on my 64-bit system. Normally this is handled by a emulation package but guess what? The Gentoo emulation packages don’t feature these only slightly vital libraries.
After reading the bug page which explained the problem, I found a site of someone who provided the 32-bit binary drivers for ALSA/Pulseaudio. And indeed, after extraction into ‘/lib32’, sound came to life from the mysterious world inside Wine.
Then I tried to start World of Warcraft. The stuttering sound of a screwed up sound mixer emerged from my speakers and no matter how I started the game, the sound was useless. Finally I gave EVE-Online a try and it had the same, horrible sound output…
So I reverted everything I did, read up on how dmix was supposed to work (which seemed like a lot less work after following the ‘simple’ guide on the pulseaudio site), set up a software mixer and made it default and there we go – audio output for all!
Now I don’t know who decided that pulseaudio was ‘lightweight’ and ‘fast’ but I know for sure that its neither – the default dmix extension for ALSA works a million times better…