Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 11 Sep 2011 10:08:12 +0200
From:      Hans Petter Selasky <hselasky@c2i.net>
To:        freebsd-multimedia@freebsd.org
Cc:        "Mikhail T." <mi@aldan.algebra.com>, freebsd-usb@freebsd.org
Subject:   Re: [uaudio] Sound-recording too fast
Message-ID:  <201109111008.12973.hselasky@c2i.net>
In-Reply-To: <201109110308.p8B38btZ057145@narawntapu.narawntapu>
References:  <201109110308.p8B38btZ057145@narawntapu.narawntapu>

next in thread | previous in thread | raw e-mail | index | archive | help
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: <vendor 0x046d product 0x081b, class 239/2, rev 2.00/0.10, addr
> 2> on usbus2 uaudio0: No playback!
> 	uaudio0: Record: 48000 Hz, 1 ch, 16-bit S-LE PCM format
> 	uaudio0: No midi sequencer
> 	pcm1: <USB audio> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201109111008.12973.hselasky>