Subject: Re: [ecasound] Playing multiple sounds at the same time
From: Kai Vehmanen (kai.vehmanen_AT_wakkanet.fi)
Date: Tue Jul 23 2002 - 15:30:03 EEST
On Tue, 23 Jul 2002, Jesper - Servicez.org Hosting wrote:
> My hammerfall works! I can play sounds on multiple channels, works fine (Oh
This is very good to hear!
> Next point; i need to play more then 1 sounds at the same time..
The normal situation currently is that only one application can use a
soundcard. But there are ways to get around this limitation:
1) Hardware support for mixing streams
- some soundcards supported by ALSA can mix multiple
streams in hardware and thus it's possible to have
multiple apps accessing the soundcard at the same time
2) Software mixing in the driver subsystem
- technically possible with ALSA's plugin system,
but not yet fully implemented; Jaroslav recently said
on alsa-devel that this is work in progress
- not supported by OSS/kernel
- supported by the commercial OSS version (SoftOSS
if I remember right)
3) Audio servers
- JACK (jackit.sf.net)
- aserver (part of ALSA, not much documentation available)
- esd (GNOME soundserver), aRts (KDE soundserver)
- various others less well-known (check www.freshmeat.net)
- note! if an audio server is used, applications must send the
audio data to the server instead of accessing the soundcard
directly themselves; many apps only support direct soundcard
access and thus they can't be used with audio servers;
ecasound has native support for JACK and aRts
But to play multiple sounds at the same time you don't actually need to
launch multiple ecasound instances. Instead you use one ecasound instance
to play all the files. The downside is that you can't dynamically
start/stop individual sounds without also starting and stopping the other
current streams.
So extending my old example:
# play one stereo-wav (foo.wav) on channels 1 and 2, and
# another (bar.wav) file on channels 7 and 8
ecasound -a:1 -i foo.wav \
-a:2 -i bar.wav -erc:1,7 -erc:2,8 -eac:0,1 -eac:0,2 \
-a:1,2 -f:s32_le,10,44100,n -o alsa,default
-- http://www.eca.cx Audio software for Linux!-- To unsubscribe send message 'unsubscribe' in the body of the message to <ecasound-list-request_AT_wakkanet.fi>.
This archive was generated by hypermail 2b28 : Tue Jul 23 2002 - 15:41:40 EEST