From: Lee Revell <rlrevell@joe-job.com>
To: Laurielle LEA <lauriellelea@yahoo.fr>
Cc: mjander@users.sourceforge.net, Alsa-devel@lists.sourceforge.net
Subject: RE: Sound with metal effect
Date: Sat, 02 Apr 2005 12:41:09 -0500 [thread overview]
Message-ID: <1112463670.24446.11.camel@mindpipe> (raw)
In-Reply-To: <20050401151743.70754.qmail@web25110.mail.ukl.yahoo.com>
On Fri, 2005-04-01 at 17:17 +0200, Laurielle LEA wrote:
> In fact, in my read function,
>
> count = 320;
> rc = snd_pcm_readi(audio_hdl, (short*)ptr, count);
> I have to have rc = 320 but I receive just 160.
>
> You tell me about other algorithms but I don't
> understand everything. Maybe I have to add other init
> hardware parameters ?
>
Your read function takes the third argument in bytes. But snd_pcm_readi
expects "count" to be in frames. It looks like you have an 8 bit stereo
stream, or 2 bytes per frame. So you did get 160 frames (320 bytes).
It looks like you need to set the device to 8 bit mono.
Please see alsa-lib/test/latency.c for an example of the correct usage.
Lee
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
next prev parent reply other threads:[~2005-04-02 17:41 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-04-01 15:17 Sound with metal effect Laurielle LEA
2005-04-02 17:41 ` Lee Revell [this message]
-- strict thread matches above, loose matches on Subject: below --
2005-04-04 13:48 Laurielle LEA
2005-03-31 21:28 Laurielle LEA
2005-04-01 7:39 ` Giuliano Pochini
2005-04-01 10:07 ` Takashi Iwai
2005-04-01 16:58 ` Manuel Jander
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=1112463670.24446.11.camel@mindpipe \
--to=rlrevell@joe-job.com \
--cc=Alsa-devel@lists.sourceforge.net \
--cc=lauriellelea@yahoo.fr \
--cc=mjander@users.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