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

David Fraser davidf@sjsoft.com
Tue Feb 3 23:36:01 2004


Fernando Pablo Lopez-Lezcano wrote:

>>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...)
>  
>
Sorry, should have explained - it's a Jabber client for instant 
messaging, so it makes sounds when people send messages etc...

>>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. 
>  
>
Thought so, thanks for clarifying...

>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
>applications. 
>
>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). 
>  
>
Thanks, I'll try these out... I think I can get xmms to use jack with a 
plugin, and then Psi can take any command to play its sounds, so it 
ought to play over jack too ... I just wanted to check whether it was a 
neccessary switch, so this clarifies a lot

David