Hi!

I tried to write some programs for sound processing recently. Most of it
went very well, but some questions about the aplay code (version 0.5.10),
which I used as example, remain unanswered. Maybe some of you can help me.

The first is: In the capture_go method a buffer is filled using
snd_pcm_plugin_read and than written directly to a wave file. The
documentation says that in block mode the driver returns the data for each
channel in a separate  part of the buffer. But wave files expect the samples
to be interleaved.  As arecord does indeed work, some of my thoughts must be
wrong. But which one is it?

And the second one: Why is the size of a fragment choosen to be a power of
2? Why not a multiple of os_page_size * number_of_voices? Is it just the
programers preference or is there a good reason for it?

Martin


_______________________________________________
Alsa-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-user

Reply via email to