[LAD] Allocating 96 but reading 16 (multple times)

David Olofson david at olofson.net
Wed Feb 16 00:11:18 UTC 2011


On Wednesday 16 February 2011, at 00.33.49, Jens M Andreasen 
<jens.andreasen at comhem.se> wrote:
[...]
> The same effect can be observed with 64 frames and 16 appears to be the
> optimal value in the loop.
[...]

To quick to post there!

This could mean that you simply have too little buffering between input and 
output. Does your application actually define that? (With read()/write() APIs, 
you usually have to do this by "pre-buffering" on the output before entering 
the actual processing loop.)

The reason why it works better with 16 frames is probably that the driver 
starts by waiting for your write()s to fill upp the output buffer, thus adding 
one DMA buffer's worth of extra buffering between the input and output.


-- 
//David Olofson - Consultant, Developer, Artist, Open Source Advocate

.--- Games, examples, libraries, scripting, sound, music, graphics ---.
|   http://consulting.olofson.net          http://olofsonarcade.com   |
'---------------------------------------------------------------------'



More information about the Linux-audio-dev mailing list