23 Jul
2009
23 Jul
'09
5:24 p.m.
Hi mates.
I am trying to understand a piece of a code I am studing . What does exactly the functions snd_pcm_hw_params_set_period_time_near sets?
In my understand period time should be the time between 2 consecutive samples, but the following code does not appears to be calculating that.
buffer_time = 500000 // What I believe that means 0.5s as US is the unit used.
if (period_time == 0 && period_frames == 0) { if (buffer_time > 0) period_time = buffer_time / 4; else period_frames = buffer_frames / 4; }
Is this period time the same as period describled in here:
http://www.fon.hum.uva.nl/praat/manual/sampling_period.html
Thanks!