Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: James Courtier-Dutton <James@superbug.demon.co.uk>
To: alsa-devel <alsa-devel@lists.sourceforge.net>
Subject: problem with "snd_pcm_hw_params_set_period_size_near"
Date: Sat, 27 Sep 2003 15:44:17 +0100	[thread overview]
Message-ID: <3F75A241.80003@superbug.demon.co.uk> (raw)

if the buffer size has already been set to 16384, and the period_size is 
trying to be set to 8196, why do I get the following results: -

period_size=8196
dir=0;
err = snd_pcm_hw_params_set_period_size_near(this->audio_fd, params, 
&period_size, &dir);
result: period_size=8196

period_size=8196
dir=1;
err = snd_pcm_hw_params_set_period_size_near(this->audio_fd, params, 
&period_size, &dir);
result: period_size=16384

In the second example, all that has changed in the value of "dir".
I though
-1 means find a value equal to or less than.
0 means find a value closest to.
1 means find a value equal to or greater than.

But the above experiment resulted in: -
1 means find a value greater than.

Cheers
James



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf

                 reply	other threads:[~2003-09-27 14:44 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=3F75A241.80003@superbug.demon.co.uk \
    --to=james@superbug.demon.co.uk \
    --cc=alsa-devel@lists.sourceforge.net \
    /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