18 Oct
2012
18 Oct
'12
11:09 a.m.
Prasant J wrote:
I'm writing an alsa application for recording & playing 16 channel audio.
The application is intended to run on an embedded platform & the resources are highly constrained.
Then I wonder how you manage to handle 16 channels. What hardware is this?
My application is not performing well with read/write methods.
How much CPU usage?
Does the mmap method has any advantages over read/write?
No, except when then samples are generated in/consumed from the device's buffer directly without copying them around, and even then it's unlikely that the time needed for copying actually matters.
Is there any thumb rule to decide when to use mmap or read/write?
Yes; use read/write.
Regards, Clemens