News for hackers. Stuff that matters.
Re:/dev/audio by RexRollman on Tuesday November 08, 2011 @07:43PM (#3213666)
How hard is it to output /dev/audio to a file instead of hardware? For example, to capture the output of streaming audio.
Re:/dev/audio by guylhem on Tuesday November 08, 2011 @08:06PM (#3213740)
That's so simple and old school !!

cat /dev/audio > record.au

Here you will get Sun .au, which is mulaw IIRC.

/dev/dsp is different.

EDIT - after a quick google search, here are some details on the encoding difference : OSS has three kind of device files for audio programming. The only difference between these device files is the default sample encoding used after opening the device. /dev/dsp uses 8 bit unsigned encoding while /dev/dspW uses 16 bit signed little endian (Intel) encoding and /dev/audio uses logarithmic mu-Law encoding. There are no other differences between the devices. All of them work in 8 kHz mono mode after opening them.

http://www.opensound.com/pguide/audio.html

Re:/dev/audio by jrockway on Tuesday November 08, 2011 @10:41PM (#3214151)
That will capture the microphone input; it won't capture the sound that the computer is playing, which is what I think the comment you are replying to wants.
Re:/dev/audio by guylhem on Wednesday November 09, 2011 @06:32AM (#3215117)
Oops, I thought the original poster to record, like a dictaphone.
Re:/dev/audio by RexRollman on Tuesday November 08, 2011 @09:56PM (#3214025)
Thank you!