From: Paul Davis <paul@linuxaudiosystems.com>
To: James Courtier-Dutton <James@superbug.demon.co.uk>
Cc: Takashi Iwai <tiwai@suse.de>,
manuel.jander@mat.utfsm.cl, alsa-devel@lists.sourceforge.net
Subject: Re: PCM format restrict dilema
Date: Tue, 16 Sep 2003 16:11:40 -0400 [thread overview]
Message-ID: <200309162011.h8GKBeKF014750@oud> (raw)
In-Reply-To: Your message of "Tue, 16 Sep 2003 20:23:30 BST." <3F676332.1000503@superbug.demon.co.uk>
>> why don't you set the sizes based on frame counts, not time? i suspect
>> you're more likely to get better results.
>
>If the api for setting based on time it present, I would expect to be
>able to use it.
you can use it. but the thing is that you are probably requesting
times in msecs, whereas almost all PCI audio interfaces only have
periods and buffers sizes that are measured in frames.
this means you will likely never get the buffer size you asked
for. its kind of like asking for 3 pounds of cheese in a store that
only measures in kilograms. if you're happy with the approximation
that will result, go ahead. otherwise, figure it out in the "correct"
units.
otoh, for USB audio, its arguably better to use msecs. sigh :)
>> i hope you handle the failure to get buffer_size/8 properly ... you
>> need to be willing to go all the way to buffer_size/2 before
>> concluding that you can't configure the device.
>
>I would expect to be able to use the "set_period_size_near" with
>direction +1, so if period_size=buffer_size/8 did not work, the alsa-lib
>would automatically select the next best one, even if it is
>buffer_size/2, but this seems to fail as well.
it may be that alsa-lib considers certain "distances" as too great to
be considered "near". however, i would agree with you that it should
work. on the other hand, if you ask for 8 periods/buffer *or more*,
this will definitely fail on many audio interfaces, since they can
only offer less. keep in mind the "direction" argument to
set_foobar_near.
--p
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
next prev parent reply other threads:[~2003-09-16 20:11 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-09-16 14:19 PCM format restrict dilema Manuel Jander
2003-09-16 16:40 ` Takashi Iwai
2003-09-16 18:10 ` James Courtier-Dutton
2003-09-16 18:47 ` Paul Davis
2003-09-16 19:23 ` James Courtier-Dutton
2003-09-16 20:11 ` Paul Davis [this message]
2003-09-17 7:05 ` Jaroslav Kysela
2003-09-17 13:48 ` James Courtier-Dutton
2003-09-17 14:20 ` Jaroslav Kysela
2003-09-17 14:22 ` Paul Davis
2003-09-17 14:16 ` Jaroslav Kysela
2003-09-17 14:50 ` James Courtier-Dutton
2003-09-17 14:58 ` Jaroslav Kysela
2003-09-17 14:48 ` Playback/Record speed mismatch Prince John
2003-09-17 7:03 ` PCM format restrict dilema Jaroslav Kysela
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=200309162011.h8GKBeKF014750@oud \
--to=paul@linuxaudiosystems.com \
--cc=James@superbug.demon.co.uk \
--cc=alsa-devel@lists.sourceforge.net \
--cc=manuel.jander@mat.utfsm.cl \
--cc=tiwai@suse.de \
/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.