[LAU] multiple applications using the soundcard with alsa
Ismael Valladolid Torres
ivalladt at gmail.com
Wed Oct 21 09:12:54 EDT 2009
Atte Andre Jensen escribe:
> A question came up on my local (non-audio) lau: Is it possible to
> automatically mix audio from different apps (desktop apps like firefox,
> flash, skype, system sounds, stuff like that) with alsa. I tend to say
> "yes" based on things I think I head mentioned here, but couldn't find
> the posts, so I have to ask again. If possible, what does it take?
>
As far as applications use the "default" device, the following
.asoundrc may work for you. it works lovely for me.
Cordially, Ismael
--
Ismael Valladolid Torres http://www.facebook.com/ivalladt
<ivalladt at gmail.com> http://twitter.com/ivalladt
t. 0034912519850 m. 0034609884094 (Yoigo)
-------------- next part --------------
# .asoundrc - Personal configuration file for ALSA
# Copyright (C) 2009 Ismael Valladolid Torres <ivalladt at gmail.com>
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301, USA.
# See the file COPYING for details.
pcm.ossmix {
type dmix
ipc_key 1021 # must be unique!
ipc_perm 0660 # sound for everybody (at least in your group)
#ipc_key_add_uid false # let multiple users share
slave {
pcm "hw:0,0"
period_time 0
period_size 1024 # must be power of 2
buffer_size 8192 # dito
#format "S32_LE"
#periods 128 # dito
#rate 8000 # with rate 8000 you *will* hear
} # if ossmix is used :)
# bindings are cool. This says, that only the first
# two channels are to be used by dmix, which is enough for
# (most) oss apps and also lets multichannel chios work
# much faster:
bindings {
0 0 # from 0 => to 0
1 1 # from 1 => to 1
}
}
# Redirect to ossmix
pcm.!default {
type plug
slave.pcm "ossmix" # use our new PCM here
}
# Redirect to ossmix
pcm.dsp {
type plug
slave.pcm "ossmix" # use our new PCM here
}
# mixer like above
ctl.mixer {
type hw
card 0
}
# Local Variables:
# mode: conf
# End:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
Url : http://lists.linuxaudio.org/pipermail/linux-audio-user/attachments/20091021/8409b102/attachment.pgp
More information about the Linux-audio-user
mailing list