From: Pannaga Bhushan <bhushan@multitech.co.in>
To: yan hang fai <hfyan0@ie.cuhk.edu.hk>
Cc: alsa-devel@lists.sourceforge.net
Subject: Re: A newbie's question with snd_pcm_writei
Date: Fri, 18 Oct 2002 15:25:11 +0530 [thread overview]
Message-ID: <3DAFDA7F.83E2FFAC@multitech.co.in> (raw)
In-Reply-To: Pine.GSO.4.10.10210081932420.4476-100000@iesun67
frame is what is played out(during playback) or what is recorded(during
capture) at each sample.
so this frame depends on what format your sound is i.e whether it is one
channel or two channel and
length of each sample, whether 16 bit or 8 bit.
so a 2 channel stereo 16-bit sound will have a frame of 4 bytes. i.e two
bytes per channel and two
channel
period size is number of frames? (or bytes?) between two successive
interrupts.
-- Pannaga Bhushan
yan hang fai wrote:
> Dear everyone
> I have a question on using this api call.
> In the last argument, we need to pass in the "frame". But the problem
> is that I dont understand the term "frame". Could anyone explain to me a
> little bit what it is? And also, what is meant by a "period"?
> I have read http://www.suse.de/~mana/alsa090_howto.html and tested
> their "Basic PCM audio" program, I heard some random noise coming out from
> my speakers as the program is executed. Then I tried to modify the
> program. First I read some pcm data into a char* from a local file, then I
> tried to call snd_pcm_writei, passing my pcm data as argument. But I hear
> no sound. So I would like to know what I should pass as the "frame"
> argument.
> Thank you very much
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
prev parent reply other threads:[~2002-10-18 9:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-10-08 11:53 A newbie's question with snd_pcm_writei yan hang fai
2002-10-18 9:55 ` Pannaga Bhushan [this message]
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=3DAFDA7F.83E2FFAC@multitech.co.in \
--to=bhushan@multitech.co.in \
--cc=alsa-devel@lists.sourceforge.net \
--cc=hfyan0@ie.cuhk.edu.hk \
/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.