Record desktop audio on Freebsd with virtual_oss and sox
install sox
switch to root
run virtual_oss replace dsp1 with your audio device
in a new terminal run sox to record the audio from the virtual_oss device
we use -v 0.99 to reduce the volume by 1% to avoid audio clipping
install sox
Code:
sudo pkg install sox libsoxr
switch to root
Code:
su
run virtual_oss replace dsp1 with your audio device
Code:
virtual_oss -Q 0 -C 2 -c 2 -r 48000 -b 16 -s 1024 -P /dev/dsp1 -R /dev/null -w vdsp.wav -l dsp
in a new terminal run sox to record the audio from the virtual_oss device
Code:
sox -r 48k -b 16 -v 0.99 -t oss /dev/dsp -t wav out.wav
we use -v 0.99 to reduce the volume by 1% to avoid audio clipping