Date: Fri, 26 Sep 2014 06:03:29 +0200 From: Polytropon <freebsd@edvax.de> To: Aymeric Mansoux <aymeric@kuri.mu> Cc: freebsd-questions@freebsd.org Subject: Re: Recording sound output of a program (was Re: Capture audio from the FreeBSD sound system) Message-ID: <20140926060329.ab6bb659.freebsd@edvax.de> In-Reply-To: <20140925121059.GC33131@treefort> References: <20140924133405.GA55640@treefort> <1411618467.29378.2.camel@lenzinote.lenzicasa> <20140925121059.GC33131@treefort>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 25 Sep 2014 14:10:59 +0200, Aymeric Mansoux wrote: > For external sound via mic/line of an internal or external soundcard, > this is straight forward yes, but I'm trying to record the sound > produced by a software without any external setup. > > playback software -> PCM audio infrastructure -> recording software If I understand the involved parts correctly, this depends on the ability of the sound card driver, which in turn relies on the actual sound hardware. For example, the Logitech SoundMan sound card had the feature you're describing: You could select one of the output channels as recording source. I think this was also possible on some models of the Creative Labs Sound Blaster. > I thought it would be possible to do it by using the internal audio > loopback of my soundcard, but regardless of which source I set as > recording device (Line, Mix, Mic, Monitor) I only get sound from the > mic. How did you get to select "monitor" as source? % mixer =rec mic Recording source: mic % mixer =rec cd Recording source: cd % mixer =rec line Recording source: line % mixer =rec monitor mixer: unknown recording device: monitor usage: mixer [-f device] [-s | -S] [dev [+|-][voll[:[+|-]volr]] ... mixer [-f device] [-s | -S] recsrc ... mixer [-f device] [-s | -S] {^|+|-|=}rec rdev ... devices: vol, pcm, line, mic, cd, rec, igain, monitor rec devices: line, mic, cd % _ I'm using the built-in sound "card" with the snd_hda driver. % dmesg | grep pcm pcm0: <HDA VIA VT1708_8 PCM #0 Analog> at cad 0 nid 1 on hdac0 pcm1: <HDA VIA VT1708_8 PCM #1 Analog> at cad 0 nid 1 on hdac0 pcm2: <HDA VIA VT1708_8 PCM #2 Digital> at cad 0 nid 1 on hdac0 But maybe this is a starting point for you: When I query the sndstat facility, I get this: % cat /dev/sndstat FreeBSD Audio Driver (newpcm: 32bit 2009061500/i386) Installed devices: pcm0: <HDA VIA VT1708_8 PCM #0 Analog> (play/rec) default pcm1: <HDA VIA VT1708_8 PCM #1 Analog> (rec) pcm2: <HDA VIA VT1708_8 PCM #2 Digital> (play) Here, pcm1 is another "rec" device. Do you have something similar? Maybe recording from that one will capture the output of the other one? -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140926060329.ab6bb659.freebsd>