Accessing raw soundcard input.

Probably more of a general Unix question but here goes.

I want to access the raw data from my microphone input (I pretty much just want to use the ADC of my sound card..). I know I can do things like
Code:
cat file.txt > /dev/dsp
to send data *to* the card, but how can I read data from the microphone input?

I'm starting to think it's not as simple as I had imagined. Guess I could always just trawl through the code of some audio application but I'd prefer to do some simple testing first.

Cheers.
 
If you open device with dumb tool such as cat, it will use default format of 8000Hz mono. Not all sound cards now support such format, so system may do conversion, and so from some point it is not exactly raw.

What's about recording, same functionality works there also. You can just read data from dsp device, but by default it will also be 8KHz mono.

To be able to control audio format you may want to look on simple tools from the audio/rawrec port.
 
Back
Top