Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Guilherme Longo <grlongo.ireland@gmail.com>
To: alsa-devel@alsa-project.org
Subject: Is snd_pcm_hw_params_set_period_time_near the same as sampling period?
Date: Thu, 23 Jul 2009 12:24:32 -0300	[thread overview]
Message-ID: <4A6880B0.3000903@gmail.com> (raw)

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!

             reply	other threads:[~2009-07-23 15:24 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-23 15:24 Guilherme Longo [this message]
2009-07-24  8:50 ` Is snd_pcm_hw_params_set_period_time_near the same as sampling period? Clemens Ladisch

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4A6880B0.3000903@gmail.com \
    --to=grlongo.ireland@gmail.com \
    --cc=alsa-devel@alsa-project.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox