NetBSD-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
audiorecord producing only white noise
Hi,
I can't seem to record audio using audiorecord(1) and /dev/sound. The
output file has only white noise. (It would be nice eventually to reduce
the hiss to silence, but one thing at a time!) Probably I'm doing
something wrong; I'm hoping someone can tell me what.
Everything's hooked up correctly. I can play sample .wav files with
audioplay(1), and I can hear the input through the speakers using the
gramofile package. (The package produces a zero-length file, however.)
While audiorecord is running, the speakers play the same hiss as
"recorded" in the file.
I have tried setting the input port to 'line' and 'cd'. The source is an
audio cassette player.
Details follow. Tnanks for any help.
--jkl
My script:
$ cat /usr/local/bin/record
#! /bin/sh
RATE=44100 # CD sampling rate
PREC=16 # precision
FORMAT=wav
ENC=slinear_le
set -x
exec audiorecord -p line -c 2 -v 254 -s ${RATE} -P ${PREC} \
-e ${ENC} -F ${FORMAT} -V $@
(Without -e I get the dread Invalid argument error, despite what the man
page seems to say.)
The output:
$ file /tmp/goose.wav
/tmp/goose.wav: RIFF (little-endian) data, WAVE audio, Microsoft PCM, 16
bit, stereo 44100 Hz
My system:
$ uname -s -p -r
NetBSD 2.0 i386
$ audioctl -a | grep record
record.rate=44100
record.channels=2
record.precision=16
record.encoding=slinear_le
record.gain=240
record.balance=32
record.port=0x2
record.avail_ports=0x7
record.seek=0
record.samples=0
record.eof=0
record.pause=0
record.error=0
record.waiting=0
record.open=0
record.active=0
record.buffer_size=65536
record.errors=0
My hardware:
$ grep auvia /var/run/dmesg.boot
auvia0 at pci0 dev 17 function 5: VIA VT8235 AC'97 (rev 0x50)
auvia0: interrupting at irq 5
auvia0: ac97: Analog Devices AD1980 codec; headphone, 20 bit DAC, no 3D
stereo
auvia0: ac97: ext id 3c7<AMAP,LDAC,SDAC,CDAC,SPDIF,DRA,VRA>
audio0 at auvia0: full duplex, mmap, independent
Home |
Main Index |
Thread Index |
Old Index