17 Nov
2011
17 Nov
'11
2:27 p.m.
Raymond Yau wrote:
The logic of your program is wrong since your program did not set channel, rate and format
It is allowed to not set some parameters; snd_pcm_hw_params() then chooses some random values for them.
The buffer and period calculation is only valid after you have choose the format and channels
This is wrong; parameters can be set in any order. (As long as format/channels are not yet set, the exact relationship between frames and bytes is not yet known, but this is handled by the parameters being intervals.)
Regards, Clemens