From owner-freebsd-multimedia@FreeBSD.ORG Sun Sep 11 08:10:59 2011 Return-Path: Delivered-To: freebsd-multimedia@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A21CA1065674; Sun, 11 Sep 2011 08:10:59 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe02.c2i.net [212.247.154.34]) by mx1.freebsd.org (Postfix) with ESMTP id F1ABD8FC12; Sun, 11 Sep 2011 08:10:58 +0000 (UTC) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.1 cv=EXVNCEO4x3+t9RAkVn3dB6M8qBBSs4D37AbViylCp14= c=1 sm=1 a=SvYTsOw2Z4kA:10 a=ME9era1m-NwA:10 a=WQU8e4WWZSUA:10 a=8nJEP1OIZ-IA:10 a=CL8lFSKtTFcA:10 a=i9M/sDlu2rpZ9XS819oYzg==:17 a=fhklYqASosamiN60ZOQA:9 a=wPNLvfGTeEIA:10 a=i9M/sDlu2rpZ9XS819oYzg==:117 Received: from [188.126.198.129] (account mc467741@c2i.net HELO laptop002.hselasky.homeunix.org) by mailfe02.swip.net (CommuniGate Pro SMTP 5.2.19) with ESMTPA id 178211322; Sun, 11 Sep 2011 10:10:56 +0200 From: Hans Petter Selasky To: freebsd-multimedia@freebsd.org Date: Sun, 11 Sep 2011 10:08:12 +0200 User-Agent: KMail/1.13.5 (FreeBSD/8.2-STABLE; KDE/4.4.5; amd64; ; ) References: <201109110308.p8B38btZ057145@narawntapu.narawntapu> In-Reply-To: <201109110308.p8B38btZ057145@narawntapu.narawntapu> X-Face: *nPdTl_}RuAI6^PVpA02T?$%Xa^>@hE0uyUIoiha$pC:9TVgl.Oq, NwSZ4V"|LR.+tj}g5 %V,x^qOs~mnU3]Gn; cQLv&.N>TrxmSFf+p6(30a/{)KUU!s}w\IhQBj}[g}bj0I3^glmC( :AuzV9:.hESm-x4h240C`9=w MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201109111008.12973.hselasky@c2i.net> Cc: "Mikhail T." , freebsd-usb@freebsd.org Subject: Re: [uaudio] Sound-recording too fast X-BeenThere: freebsd-multimedia@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Multimedia discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Sep 2011 08:10:59 -0000 On Sunday 11 September 2011 05:08:37 Mikhail T. wrote: > Hello! > > I have a Logitech's webcam with built-in microphone. The audio device is > recognized by FreeBSD-8-stable as: > > uaudio0: 2> on usbus2 uaudio0: No playback! > uaudio0: Record: 48000 Hz, 1 ch, 16-bit S-LE PCM format > uaudio0: No midi sequencer > pcm1: on uaudio0 > > mixer(8) reports it a little strangely, depending on which /dev-entry I > use: > > % mixer -f /dev/mixer1 > Mixer vol is currently set to 75:75 > Mixer pcm is currently set to 75:75 > > % mixer -f /dev/dsp1 > Mixer rec is currently set to 45:45 > > But recording works. For example, using the rec-utility from the SoX > package: > > % env AUDIODEV=/dev/dsp1 rec /tmp/test.aiff > Input File : '/dev/dsp1' (ossdsp) > Channels : 2 > Sample Rate : 48000 > Precision : 16-bit > Sample Encoding: 16-bit Signed Integer PCM > > Well, it almost works, because the recording ends up highly distorted -- > much faster, than what I'm really saying into microphone. About three > times faster. For example, if I let the above command run for 18 seconds > (according to time(1)), the created test.aiff will contain a 6-seconds > recording. > > How do I fix this? Thanks! Yours, Hi, Doesn't aiff files use a fixed sample rate? Try: env AUDIODEV=/dev/dsp1 rec -r 16k /tmp/test.aiff Or: env AUDIODEV=/dev/dsp1 rec -r 8k /tmp/test.aiff --HPS