Amish Munshi wrote:
On Wednesday 04 Feb 2004 12:39 am, Shourya P. Bhattacharya wrote:
Hi I am writing a program which needs to read from the line-in of my soundcard and reproduce/store the sound. I need to read from the sound device, store it in some buffer or file and then play it back later.Can anyone suggest some C/C++ libraries which provides interface to do that in Linux? I have looked at the SDL API and ALSA Library API for it. SDL provides nice API but cannot capture audio from the sound device that leaves me only with ALSA, which seems to be quite messy. Has anyone worked with these API's and share some knowledge? Or can anyone suggest other alternatives? Any input would be highly appriciated.
All that is required is to open ("/dev/audio") as a read-only and do some ioctl's on the handle you get from fopen. Use a loop to continously receive voice, you may do anything with those bit you get.
Thanks mate. I will try it out.
Shourya M.Tech Scholar IIT Bombay