snd_pcm_writei vs snd_pcm_mmap_writei
Hi all,
these functions are similar : snd_pcm_writei and snd_pcm_mmap_writei
but witch is the best or witch is fastest?
bye,
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 2 lines · Dino
these functions are similar :
snd_pcm_writeiandsnd_pcm_mmap_writei
but witch is the best or witch is fastest?
Using mmap access can speed up some programs that are able to construct generate their audio data directly in the output buffer, because copying from the application's buffer to the sound card buffer can be avoided. This hypothetical speed advantage is nullified when using snd_pcm_mmap_writei because this function copies the buffer, too.
Using snd_pcm_mmap_writei makes sense only when you do have an mmapped device but want to copy some data from elsewhere anyway.
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