[PlanetCCRMA] How to allow multiple applications to output audio at once...

Fernando Pablo Lopez-Lezcano nando@ccrma.Stanford.EDU
Tue Feb 3 17:18:01 2004

> I currently have a problem with running XMMS and Psi.
> Basically I want Psi to be able to output sounds to indicate events, 
> while XMMS is running.

(sorry but I have no idea what Psi is...)

> The current situation: if I run them through OSS or Alsa, Psi seems to 
> queue the sounds,
> then at the end of the XMMS track, the sounds are played at which point 
> XMMS complains that it can't access the sound device.
> Has anyone else had this problem, and/or found a solution? Would Jack 
> enable me to do what I want, or have I got Alsa configured wrongly?

OSS and ALSA programs normally monopolize the audio devices, that is,
they open the devices and other programs cannot access them while they
are opened. So the behavior you are seeing is normal. 

There is a special plugin in ALSA named "dmix" that can mix multiple
streams in software, but I have not used it and I'm not sure how to
configure it (if needed). Obviously this will only work with ALSA native

Jack does that (mixing and routing multiple streams) but all
applications connected to Jack have to be designed to use it (although
there are some hacks available like jacklaunch, which can redirect some
OSS programs to use jack, albeit with some additional buffering which
increases the latency). 

-- Fernando