On Tue, Apr 18, 2006 at 01:57:57PM +0200, Tobias Urban wrote:

> I have already tried the snd_pcm_drain() function but this did not work with
> my capture stream. Now I am trying a direct MMAP access - call hesync,
> receive pointer, begin, read sample data, commit. However, the official ALSA
> example code does not help me a lot because it is only for playback.
> Additionally I do not know how the capture works an how to properly read
> from it.

The mmap playback and capture interfaces are identical: begin(), read or 
write, commit(). 

The easiest way to do what you want is probably to do wait, begin() and
commit() all the time to keep the driver happy, and only read the data
when you need it. So don't ever stop the driver.

For example code, you may read e.g. the C++ class that I wrapped 
around ALSA mmap access:

  htttp://users.skynet.be/solaris/linuxaudio
 
and find the link to clalsadrv-1.0.4.


-- 
FA

Follie! Follie! Delirio vano e' questo!




-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user

Reply via email to