From: Clemens Ladisch <clemens@ladisch.de>
To: Ignacy Kasperowicz <fikufik@gmail.com>
Cc: alsa-devel@alsa-project.org
Subject: Re: Problem with setting period time and buffer time.
Date: Tue, 19 Feb 2008 09:17:15 +0100 [thread overview]
Message-ID: <47BA908B.7040700@ladisch.de> (raw)
In-Reply-To: <9673d3ac0802181557m6bd35f28w7680c9a9a979ab67@mail.gmail.com>
Ignacy Kasperowicz wrote:
> I need to set proper period time for my application. What I need my
> code to do is to play sine wave with set frequency and for exact time
> of 1/1200 s (something about 834 us).
The period time specifies after which interval the sound hardware issues
an interrupt, i.e., after which time your application gets waken up when
it is waiting for the sound buffer to become non-empty. This has
nothing to do with the actual sounds that are being played.
You are not required to write data in period-sized chunks, so you don't
actually need to care about the period time.
> When I try to set period time for 834 us I've got this error:
> Unable to set period time 834 for playback: Invalid argument .
> Honestly speaking I've got this error message no matter what value I
> try to set).
Period (and buffer) times are hardware dependent; you cannot be sure
that any specific value is supported by the sound card.
(And you're calling snd_pcm_hw_params_set_period_time_max() which would
allow the driver to choose any lower value.)
HTH
Clemens
next prev parent reply other threads:[~2008-02-19 8:15 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-18 23:57 Problem with setting period time and buffer time Ignacy Kasperowicz
2008-02-19 8:17 ` Clemens Ladisch [this message]
[not found] ` <9673d3ac0802190320gab8bb7ara92a27b7f602d28b@mail.gmail.com>
2008-02-19 12:41 ` Ignacy Kasperowicz
2008-02-19 12:42 ` Clemens Ladisch
2008-02-19 12:49 ` Ignacy Kasperowicz
2008-02-19 14:45 ` Clemens Ladisch
2008-02-19 20:19 ` Ignacy Kasperowicz
2008-02-20 0:35 ` Ignacy Kasperowicz
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=47BA908B.7040700@ladisch.de \
--to=clemens@ladisch.de \
--cc=alsa-devel@alsa-project.org \
--cc=fikufik@gmail.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.