From owner-freebsd-questions@FreeBSD.ORG Fri Sep 26 04:03:34 2014 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1E79554A for ; Fri, 26 Sep 2014 04:03:34 +0000 (UTC) Received: from mx01.qsc.de (mx01.qsc.de [213.148.129.14]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CD265210 for ; Fri, 26 Sep 2014 04:03:33 +0000 (UTC) Received: from r56.edvax.de (port-92-195-78-194.dynamic.qsc.de [92.195.78.194]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx01.qsc.de (Postfix) with ESMTPS id C78C53CD18; Fri, 26 Sep 2014 06:03:30 +0200 (CEST) Received: from r56.edvax.de (localhost [127.0.0.1]) by r56.edvax.de (8.14.5/8.14.5) with SMTP id s8Q43TP0002561; Fri, 26 Sep 2014 06:03:30 +0200 (CEST) (envelope-from freebsd@edvax.de) Date: Fri, 26 Sep 2014 06:03:29 +0200 From: Polytropon To: Aymeric Mansoux 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> Reply-To: Polytropon Organization: EDVAX X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Sep 2014 04:03:34 -0000 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: at cad 0 nid 1 on hdac0 pcm1: at cad 0 nid 1 on hdac0 pcm2: 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: (play/rec) default pcm1: (rec) pcm2: (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, ...