All of lore.kernel.org
 help / color / mirror / Atom feed
* Docu:: Alsa Audio API:: A minimal capture program
@ 2004-01-27 21:40 Torsten Mohr
  2004-01-28 15:18 ` Clemens Ladisch
  0 siblings, 1 reply; 7+ messages in thread
From: Torsten Mohr @ 2004-01-27 21:40 UTC (permalink / raw)
  To: alsa-devel

Hi,

i copied the "minimal capture program" from the
Alsa page -> Documentation -> Tutorial on using the
ALSA Audio API -> A minimal capture program.

I added "int rate = 44100" and changed the wrong
parameter "44100" in "snd_pcm_hw_params_set_rate_near"
to "&rate".

bash# gcc capture.c -lasound
bash# a.out default

But if i add a "sleep(1)" in the "for(i = 0; i < 10; i++)",
the whole program crashes.


I want to write a program where some chunk of
data is sampled from time to time, with some delay
inbetween.  The behaviour above (with sleep(1))
is a good example for what i want to do.

Can anybody tell me what i need to change to make
the program work ok?


Thanks for any hints,
Torsten.




-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2004-02-09 17:18 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-01-27 21:40 Docu:: Alsa Audio API:: A minimal capture program Torsten Mohr
2004-01-28 15:18 ` Clemens Ladisch
2004-01-28 22:38   ` Torsten Mohr
2004-01-31 13:57     ` Jaroslav Kysela
2004-02-09  0:18       ` Torsten Mohr
2004-02-09  7:48         ` Jaroslav Kysela
2004-02-09 17:18           ` Torsten Mohr

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.