Subject: Re: How to capture sound from an application?
To: None <netbsd-help@netbsd.org>
From: Michael Core <520079546242-0001@t-online.de>
List: netbsd-help
Date: 06/24/2002 16:17:04
jtb@diantre.net (Julien Rampon) wrote:

Hi, 

> "Michael Core" <520079546242-0001@t-online.de> wrote:
> > I want to capture the sound output from some applications and
> > redirect it to a file. How can this be done?

> You can use sox (/usr/pkgsrc/audio/sox), like that :
> sox -t ossdsp -c 2 -r 44100 -w -s /dev/dsp -t wav example.wav

Thanks for you help but it doesn't work. I had to reconfigure
/usr/pkgsrc/audio/sox so that it's compiled with --with-oss-dsp,
LDFLAGS+=-lossaudio and patch oss.c to use <soundcard.h>. Now, either
sox says 'device busy' or the application says 'device busy'. I've tried
it with /dev/{dsp,audio,sound} although they are all sym-links to
/dev/audio0 without any success. Did it really work for you or did you
extrapolate that from man sox? Maybe this depends on the soundcard but
mine (CMI8738) is full-duplex capable. Though this isn't really about
full-duplex because I don't want to record the sound output from the
speakers.

Regards,
Michael