[linux-audio-user] Common linux audio layer
Dave Phillips
dlphilp at bright.net
Mon Jan 10 14:07:57 EST 2005
Greetings:
I've been following this thread since it began. IIUC the original
question was something like: "I want to run a number of audio apps
simultaneously but [Linux, ALSA, SCO] won't allow it on my system".
Again, if I understand the issue correctly, it seems that we're
discussing audio stream multiplexing. Now, on cards like the SBLive we
get what's called hardware mixing, a nicely transparent technology that
lets me run multiple soundapps without doing anything extra to make it
happen. You *can* do this in software, and as Lee points out the ALSA
dmix plugin will do it.
My laptop includes a NeoMagic 256A/V audio/video chip, i.e., no
hardware mixing. So under normal circumstances I get to use one soundapp
at a time. Here's my $HOME/.asoundrc file that gives me software audio
multiplexing :
#########################################################
#
# asoundrc file to demonstrate use of ALSA dmix plugin
#
pcm.!default {
type plug
slave.pcm "dmixer"
}
pcm.dmixer {
type dmix
ipc_key 1024
slave {
pcm "hw:0,0"
period_time 0
period_size 1024
buffer_size 4096
rate 44100
}
bindings {
0 0
1 1
}
}
ctl.dmixer {
type hw
card 0
}
##########################################################
An example usage might look like this:
xine -A alsa foo.mpg
aplay -f cd -D default foo.wav
Performance is improved on my machine (a PII 366) if I change the sample
rate to 32000. At 44.1 kHz the little box just barely keeps up whie
playing a movie at the same time I run a major soundapp. There are
probably other interesting tweaks, but this example might get someone
started in the right direction.
I think the Windoze system audio mixer does the same thing as dmix but
rather transparently. It is a pain to have to write a specific asoundrc
file, but it's not an awful pain...
(dp thanks Takashi Iwai for explaining dmix to him over and over again...)
Best,
dp
tim hall wrote:
>Last Saturday 08 January 2005 18:53, Lee Revell was like:
>
>
>>Hasn't anyone been listening? dmix can do this now. It's a bug in your
>>distro if this blocking behavior is the default. There's no excuse for
>>it.
>>
>>
>
>It might bear a little further explanation. Does anyone have any pointers to
>useful documentation? If this is the same as the dbus-1 daemon then it's only
>just made it into DeMuDi and I for one haven't figured its function yet.
>
>Yeah yeah, I'm Googling already ...
>
>cheers
>
>tim hall
>http://glastonburymusic.org.uk
>
>
>
>
More information about the Linux-audio-user
mailing list