[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]
Re: recording sound (was: "")
- To: linux-india-programmers@xxxxxxxxxxxxxxxxxxxxx
- Subject: Re: recording sound (was: "")
- From: Kousik Nandy <kousik.n@xxxxxxxxxx>
- Date: Mon, 04 Sep 2000 10:40:58 +0530
- Organization: Analog Devices Inc.
- References: <20000826081421.23351.qmail@web4505.mail.yahoo.com> <39AE318F.2E86AB6E@yahoo.com> <20000831170836.A24976@india.com> <39AF1C35.1FE8562B@yahoo.com>
Ashish kumar wrote:
>
> Actually I am trying to write a program. so any functions
> or headers to look to.
int soundcard = open("/dev/dsp", O_RDONLY);
// fcntl(soundcard, F_SETFL, O_NONBLOCK); /* If you require */
int dataread = read(soundcard, somebuffer, sizeof(somebuffer));
if( dataread < 0 )
{
... /* care if you've set NONBLOCKING I/O */
}
Hope this helps, (just make sure /dev/dsp works, else try /dev/audio)
Kousik.