PDA

View Full Version : ALSA's dmix plugin rocks.


Deacon
27-07-2004, 09:05:49
I use KDE and artsd. Everything that needs artsdsp seems to work. Except the Helix-based Realplayer beta. It wants to snatch the sound device and sit on it forever. Artsd won't allow this, so realplay blocks. I was stumped until I discovered that the ALSA drivers have a plugin called dmix. Enable it using ~/.asoundrc, make sure arts is using ALSA, uncheck "full duplex" in KDE control center, and you can then use "aoss realplay" to call realplay. Now you have a well-behaved app that shares the soundcard with others.

Interestingly, I tried "artsdsp aoss realplay", but the artsdsp output does not show in Krec. So no "stealing" unless you want to use artsdsp with the ancient Realplayer 8. :)

Here's the .asoundrc that I cut-and-pasted from the web:

pcm.dmixer {
type dmix
ipc_key 1024
slave {
pcm "hw:0,0"
period_time 0
period_size 1024
buffer_size 8192
rate 44100
}

bindings {
0 0
1 1
}
}

pcm.dsp0 {
type plug
slave.pcm "dmixer"
}

pcm.!default {
type plug
slave.pcm "dmixer"
}

pcm.default {
type plug
slave.pcm "dmixer"
}

ctl.mixer0 {
type hw
card 0
}

Deacon
27-07-2004, 09:06:38
Dmix enables multiplexing at the driver level.

Debaser
27-07-2004, 09:31:22
What?

Nav@work
27-07-2004, 09:59:30
wrong fo.. site.

zmama
27-07-2004, 11:13:08
Wahhhh :cry: I understood what he was saying.

I'd better go hang out with Drekkus and Lurker somemore

Darkstar
27-07-2004, 19:32:46
This is why Linux is not ready for the masses... ;)

Resource Consumer
27-07-2004, 23:35:15
Wasn't Linux in Charlie Brown?

Deacon
27-07-2004, 23:35:59
It's getting better all the time. :)

Resource Consumer
27-07-2004, 23:37:00
Peanuts :)

Deacon
27-07-2004, 23:40:53
Yep. The one with the blanket.