[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]
Re: recording sound (was: "")
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.