On Fri, Apr 08, 2016 at 07:09:59PM -0300, Henrique N. Lengler wrote: > Hi, > > Is there a way to record the sound playing on my speakers? > Like duplicating it and saving on my computer everything that goes out to the > speaker. > > I would like to to this to record some screencast. > > Any way of doing this? >
First you have to create a record-whay-you-hear device (aka monitoring), for instance add these options to /etc/rc.conf.local: sndiod_flags=-s default -m play,mon -s mon see -m and -s options in sndiod man page for more details. Then, restart sndiod with: rcctl restart sndiod Then, use your favourite program to record audio and configure it to record from device "snd/0.mon". Example: aucat -f snd/0.mon -o file.wav at this point whatever your system plays is recorded into file.wav. HTH