Recording from sound card

Polytropon freebsd at
Fri Feb 11 08:20:47 UTC 2011

On Thu, 10 Feb 2011 22:17:57 -0500, Robert Ames <robertames at> wrote:
> I'm having problems trying to record from a sound card under
> 8.1-RELEASE.  The last time I tried this was many releases ago,
> possibly 4.x-RELEASE.  Back then I would do something like "cat
> /dev/dsp > file" but now when I try it I just end up with a 0 byte
> file.  I'm using a different sound card than before so maybe that
> has something to do with it.  Or possibly I just don't know which
> device to use.  Playing sounds using "cat file.wav > /dev/dsp0.0"
> works fine, but I can't get recording to work.  Does anyone have
> any suggestions?  Thanks.

My suggestion would be to install the port "sox", it will
provide a "rec" command that can be used to record WAV or
any other supported audio file format, e. g.

	% rec


	% rec bar.wav

And sox provides other excellent command line tools for
audio manipulation (sox, play, rec); see "man sox" for
details. Note that "play <filename>" is easier than
cat'ing the file to the dsp device directly (which may
require specific access permissions).

Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...

More information about the freebsd-questions mailing list