Hi,
I tried to use the current CVS version of the alsa lib and aserver tool.
I would like to use two instances of aplay in the same time.
First, I tried with this configuration :
server.local {
host localhost
socket /tmp/alsa
port 8888
}
pcm.shared_left {
type share
slave.pcm "plughw:0,0,0"
bindings {
0 0
}
}
pcm.shared_right {
type share
slave.pcm "plughw:0,0,0"
bindings {
0 1
}
}
pcm.remote_left {
type shm
server local
pcm "plug:shared_left"
}
pcm.remote_right {
type shm
server local
pcm "plug:shared_right"
}
I started my aserver in a terminal, it works, but when I start aplay in
another terminal, overruns always occur (messages like "xrun!!! (at least
0.083 ms long)" ).
I also tried aserver with another configuration :
server.other {
host 127.0.0.1
socket /tmp/alsa
}
pcm.test {
type shm
server other
pcm 0_6_7
}
pcm.test2 {
type shm
server toto
pcm 0_0_1
}
pcm.0_6_7 {
type plug
ttable.0.6 1
ttable.1.7 1
slave.pcm {
type hw
card 0
}
}
pcm.0_0_1 {
type plug
ttable.0.0 1
ttable.1.1 1
slave.pcm {
type hw
card 0
}
}
When I start aserver and only one aplay (aplay -D test file.wav) process, it
works, but when I start a second instance of aplay (aplay -D test2 file.wav),
aserver tells that the ressource is busy whereas I saw that aserver open the
device in SND_PCM_NONBLOCK mode.
Does anyone have an idea ?
Thanks in advance,
Nico
Le Vendredi 23 Novembre 2001 10:44, Jaroslav Kysela a �crit :
> On Fri, 23 Nov 2001, Nicolas DEVERGE wrote:
> > Hi,
> > I have installed the latest Alsa drivers on my linux distribution.
> > I have a big problem : I can not play simultaneously several soundfiles
> > on the same sound card (with have 10 output channels). I use aplay for
> > playing on specific channel but I can not start two instances of aplay in
> > the same time, the second wait for the end of the first for starting.
> > My question is : is aserver a tool for playing simultaneously sound files
> > on the same device, like esound or arts ? if so, where can I fond some
>
> Yes and no. We're missing the mix plugin, but the share plugin allows to
> merge more streams into one device, but the channels are not mixed. Try
> this configuration:
>
> server.local {
> host localhost
> socket /tmp/alsa
> }
>
> pcm.shared_left {
> type share
> slave.pcm "plughw:0,0,0"
> bindings {
> 0 0
> }
> }
>
> pcm.shared_right {
> type share
> slave.pcm "plughw:0,0,0"
> bindings {
> 0 1
> }
> }
>
> pcm.remote_left {
> type shm
> server local
> pcm "plug:shared_left"
> }
>
> pcm.remote_right {
> type shm
> server local
> pcm "plug:shared_right"
> }
>
> Run aserver and type:
>
> aplay -D remote_left <a.wav>
> aplay -D remote_right <b.wav>
>
> You should hear simultaneously two wav files. The first from left and the
> second from right speaker.
>
> Jaroslav
>
> -----
> Jaroslav Kysela <[EMAIL PROTECTED]>
> SuSE Linux http://www.suse.com
> ALSA Project http://www.alsa-project.org
_______________________________________________
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel