howto record direct from the soundcard?

like one can do ls > /dev/dsp to send stuff to the soundcard
is there a way reversing it and recording what's playing?

e.g. your browser is playing a tune is there a
way to capture the sound to a file, wav mp3 etc?

Or a simple application. (CLI)

not including bloated gnome or kde apps with 300 hundred
library dependencies.

anyone?
 
Try out SoX http://www.freebsdsoftware.org/audio/sox.html - Sound eXchange, the Swiss Army knife of audio manipulation. I use it as follows on by Ubuntu box to get sound from my tv cable connection. It may work for you as well..

Code:
sox -c 2 -s -w -r 32000 -t ossdsp /dev/dsp1 -t ossdsp -w -r 32000 /dev/dsp

It works with other programs too
 
It appears to record but just a blank file.

Code:
$ rec 1.wav     

Input File     : '/dev/dsp' (ossdsp)
Channels       : 2
Sample Rate    : 48000
Precision      : 16-bit
Sample Encoding: 16-bit Signed Integer PCM

In:0.00% 00:00:10.07 [00:00:00.00] Out:479k  [  -===|====- ]        Clip:0    ^C
Aborted
.

i've been messing about for hours, no luck
tried messing with the mixer too.
 
bigearsbilly said:
like one can do ls > /dev/dsp to send stuff to the soundcard
is there a way reversing it and recording what's playing?

e.g. your browser is playing a tune is there a
way to capture the sound to a file, wav mp3 etc?

You are complicating things. It is certainly possible with sound servers: like audio/nas
 
Only some cards support recording the pcm channel directly. If your card and drivers support it, you would be able to run 'mixer =rec pcm'. You will likely get an error though, saying "unknown recording device: pcm".

You could also try the OSS drivers. There appear to be more options for what you want with OSS:

http://74.125.93.132/search?q=cache...+device&cd=3&hl=en&ct=clnk&gl=us&client=opera

And, finally, of course, you have the option of running a cable from the line-out on your sound card to the line-in and just recording from the normal "mic" recording device.

Adam
 
yes thanks adam.
I had tried the =rec and got the error.
I tried =rec vol

maybe it is the card, as it doesn't work with debian either
but debian does on my laptop.

thanks chaps,
i've moved on to ruby on rails now
 
Back
Top