[LAD] incorrect number of samples reading from /dev/dsp1

farhan baluch farhanbaluch at gmail.com
Tue Feb 1 05:55:25 UTC 2011


Hi All,

I am trying to read data from a usb microphone and using the pretty standard
method of using ioctl's to setup the sampling rate, channels, bits and block
size . This all works so the device is correctly setup. I then use "read" to
read samples from the device which shows up as /dev/dsp1. I get a lot more
samples from this read command in one second of recording than the set
sample rate. E.g. if i set 10Khz on one run i got 269312 samples. Looking at
the raw data it looks like there is a lot of duplication of data? is this
common for the audio input device? if so what kind of encoding is it (e.g
with some specific redundancy built in)?

thanks
farhan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxaudio.org/pipermail/linux-audio-dev/attachments/20110131/2b1da04e/attachment.html>


More information about the Linux-audio-dev mailing list