This looks Great !

I haven't yet experimented a lot with .asoundrc files, so please excuse me if the 
following questions are irrelevant or OTO, but:

I was wondering if one could define a plug pcm, that offers two stereo pairs routed 
with policy "average" to a single-stereo "hw" slave.

My understanding is that until this dmix pcm, there was no "official" means supported 
by alsalib to achieve software mix of streams comming from differents apps.

Could I have one app open the first pair of my hypothetic plug pcm, and another app 
open the second pair ?
I guess this would be managed like a concurrent access to a pcm, and block or fail the 
second open() call. 

Would'nt it be nice to create a dmix pcm "behind"  a such plug pcm, to provide mix in 
a transparent way ?

thanks for your light over this 
Marc.



> -----Original Message-----
> From: Jaroslav Kysela [mailto:[EMAIL PROTECTED]]
> Sent: mercredi 12 février 2003 10:46
> To: ALSA development
> Subject: [Alsa-devel] dmix plugin
> 
> 
> Hi all,
> 
>       a next step to get the lowlatency sharing of exclusive 
> PCM devices 
> is in ALSA CVS - the dmix (direct mixing) plugin..
>       How it works? Basically, the playback in driver runs forewer
> without any xrun detection. The ring buffer (only just played 
> areas) is
> also silenced in each interrupt. Then we have multiple clients and a
> process (server) which passes the file descriptor of playback 
> devices to
> them. The server also takes care about freeing of used shm memory and
> semaphore.
>       The big step forward is that we share one mmaped ring buffer
> accross many processes and each process can add samples into 
> it without
> any process<->kernel swaps. Also, each processes are independant, thus
> failing of one doesn't break others. It's not multithreaded, 
> we don't need
> this mechanism.
> 
> Here is an .asoundrc example configuration (plugin defaults 
> are 48kHz, 
> stereo, signed 16-bit little endian):
> 
> pcm.dmix {
>       type dmix
>       ipc_key 1234    # must be unique for all dmix plugins!!!!
>       slave {
>               pcm "hw:0,0"
>       }
> }
> 
>       Then try: 'aplay -Dplug:dmix <filename>' on multiple consoles.
> 
>       Note that it's still alpha code and there are some not correctly
> implemented functions (like drain, rewind and more). Note 
> that you'll need
> also the latest ALSA driver from CVS, because the silence settings was
> enhanced a bit and bug in the timer code will crash your machine.
> 
>                                       Enjoy it!
>                                               Jaroslav
> 
> -----
> Jaroslav Kysela <[EMAIL PROTECTED]>
> Linux Kernel Sound Maintainer
> ALSA Project, SuSE Labs
> 
> 
> 
> -------------------------------------------------------
> This SF.NET email is sponsored by:
> SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
> http://www.vasoftware.com
> _______________________________________________
> Alsa-devel mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/alsa-devel
> 


-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
_______________________________________________
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel

Reply via email to