HW mix
hi all,
i want to mix some pcm streams using hardware (where possible). One process
with some thread witch want to play with one device (hw:0,0). Actually i simply open the device as it can (32 at max for me) with snd_pcm_open() and hw:0,0 as the device. It's seems to work but i don't know if it's the rigth way.
tnx,
Dino
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id396&op=click
Quoted 4 lines · Dino
i want to mix some pcm streams using hardware (where possible). One process
with some thread witch want to play with one device (hw:0,0). Actually i simply open the device as it can (32 at max for me) withsnd_pcm_open()and hw:0,0 as the device. It's seems to work but i don't know if it's the rigth way.
"hw:0,0" will fail if another program has already opened it. Use "hw:0" which instructs ALSA to open the first available subdevice.
HTH
Clemens
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
Quoted 8 lines · Clemens Ladisch
Quoted 4 lines · Dino
i want to mix some pcm streams using hardware (where possible). One process
with some thread witch want to play with one device (hw:0,0). Actually i simply open the device as it can (32 at max for me) withsnd_pcm_open()and hw:0,0 as the device. It's seems to work but i don't know if it's the rigth way."hw:0,0" will fail if another program has already opened it. Use "hw:0" which instructs ALSA to open the first available subdevice.
Nope, hw:0,0 is correct (CARD,DEVICE). You meant probably hw:0,0,0 (CARD,DEVICE,SUBDEVICE).
Jaroslav
-----
Jaroslav Kysela <[email protected]>
Linux Kernel Sound Maintainer
ALSA Project, SUSE Labs
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
Quoted 8 lines · Jaroslav Kysela
Quoted 6 lines · Clemens Ladisch
Quoted 4 lines · Dino
i want to mix some pcm streams using hardware (where possible). One process
with some thread witch want to play with one device (hw:0,0). Actually i simply open the device as it can (32 at max for me) withsnd_pcm_open()and hw:0,0 as the device. It's seems to work but i don't know if it's the rigth way.
Quoted 5 lines
Quoted 2 lines
"hw:0,0" will fail if another program has already opened it. Use "hw:0" which instructs ALSA to open the first available subdevice.
Nope, hw:0,0 is correct (CARD,DEVICE). You meant probably hw:0,0,0 (CARD,DEVICE,SUBDEVICE).
Is there anything wrong with using "hw:0" instead of "hw:0,0", or are they equivalent? It's what I've always used, without issue.
Signature · 8 lines
Glenn Maynard ------------------------------------------------------- This SF.Net email is sponsored by: New Crystal Reports XI. Version 11 adds new functionality designed to reduce time involved in creating, integrating, and deploying reporting solutions. Free runtime info, new features, or free trial, at: http://www.businessobjects.com/devxi/728
At Tue, 19 Apr 2005 02:06:47 -0400,
Quoted 10 lines · Glenn Maynard
Quoted 8 lines · Jaroslav Kysela
Quoted 6 lines · Clemens Ladisch
Quoted 4 lines · Dino
i want to mix some pcm streams using hardware (where possible). One process
with some thread witch want to play with one device (hw:0,0). Actually i simply open the device as it can (32 at max for me) withsnd_pcm_open()and hw:0,0 as the device. It's seems to work but i don't know if it's the rigth way.
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
"hw:0,0" will fail if another program has already opened it. Use "hw:0" which instructs ALSA to open the first available subdevice.
Nope, hw:0,0 is correct (CARD,DEVICE). You meant probably hw:0,0,0 (CARD,DEVICE,SUBDEVICE).
Is there anything wrong with using "hw:0" instead of "hw:0,0", or are they equivalent? It's what I've always used, without issue.
"hw:0" is equal with "hw:0,0", but not with "hw:0,0,0". The default subdevice argument is -1, i.e. "hw:0,0,-1". The -1 means the auto-allocation as described above. When you pass 0 explicitly there, only the substream 0 is opened, and failed if it's already occupied.
Takashi
-------------------------------------------------------
This SF.Net email is sponsored by: New Crystal Reports XI. Version 11 adds new functionality designed to reduce time involved in creating, integrating, and deploying reporting solutions. Free runtime info, new features, or free trial, at: http://www.businessobjects.com/devxi/728