From: Torsten Mohr <tmohr@s.netic.de>
To: alsa-devel@lists.sourceforge.net
Subject: Docu:: Alsa Audio API:: A minimal capture program
Date: Tue, 27 Jan 2004 22:40:03 +0100 [thread overview]
Message-ID: <200401272240.03344.tmohr@s.netic.de> (raw)
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
next reply other threads:[~2004-01-27 21:40 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-01-27 21:40 Torsten Mohr [this message]
2004-01-28 15:18 ` Docu:: Alsa Audio API:: A minimal capture program 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
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=200401272240.03344.tmohr@s.netic.de \
--to=tmohr@s.netic.de \
--cc=alsa-devel@lists.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 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.