* A newbie's question with snd_pcm_writei
@ 2002-10-08 11:53 yan hang fai
2002-10-18 9:55 ` Pannaga Bhushan
0 siblings, 1 reply; 2+ messages in thread
From: yan hang fai @ 2002-10-08 11:53 UTC (permalink / raw)
To: alsa-devel
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
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: A newbie's question with snd_pcm_writei
2002-10-08 11:53 A newbie's question with snd_pcm_writei yan hang fai
@ 2002-10-18 9:55 ` Pannaga Bhushan
0 siblings, 0 replies; 2+ messages in thread
From: Pannaga Bhushan @ 2002-10-18 9:55 UTC (permalink / raw)
To: yan hang fai; +Cc: alsa-devel
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2002-10-18 9:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-10-08 11:53 A newbie's question with snd_pcm_writei yan hang fai
2002-10-18 9:55 ` Pannaga Bhushan
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.