Skip to contentSkip to conversation

snd_pcm_writei vs snd_pcm_mmap_writei

DISCUSSION Dino 2 participants 2 messages Apr 18, 2005

lore
Share & tools
lore

Dino

author
#0 lore raw

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

#1 lore raw
Quoted 2 lines · Dino

these functions are similar : snd_pcm_writei and snd_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