On Thu, 17 Sep 2009 12:09:21 GMT,
Post by Bob MastaOn Wed, 16 Sep 2009 14:47:38 -0700 (PDT),
Post by vinaykabadiHello,
I am an software engineer who works for audio development. I have used
Dsound for my capture playback, in the mean while I have found that
the USB camera with mic captures more than specified frequency. I
tried to capture at 8000Hz, 16 bits, mono. But when I get the average
results in 1 minutes.. I found that it is actually capturing around
8100 Hz. The same thing happens for playback too with USB Speakers.
Not only my code it seems that all the audio applications behave in a
same way.
But the sound card devices behaves properly i.e they capture more or
less 8000Hz. I dont understand why Xp behaves like this.
Can sombody help me out to get an work around to avoid this problem.
Regards
Vinay
Does the same thing happen with the built-in sound
chipset? Or with different brands of USB sound?
If it only happens with one particular USB
product, that would make me suspect its own
internal chipset was to blame. If it happens also
with other USB devices and the built-in sound
chipset, then I'd guess it was an XP problem.
I have never found any documentation on when and
where sample rate conversion is performed. I get
the impression that it might be done either by
Windows or by the sound chipset itself.
I do know that there are magic sample rates that
are typically correct, either without SRC or maybe
where the SRC is "perfect". These are usually
integer submultiples of 48000 Hz... so I'd think
your 8000 would be right on.
I'll try to test 8000 on some of my systems later
today and get back to you tomorrow.
Couldn't wait... this gets curiouser and
curiouser!
Tested on XP with built-in Realtek HD chipset,
plus cheapie "USB Audio" device. Counted ticks
from a multimedia timer set to 1 msec, read wave
sample positions with waveInGetPosition and
waveOutGetPosition. Computed running sample rate,
read it at 120 sec. Tested at 48000, 44100, and
8000 Hz sample rates.
The Realtek was pretty close to specs at all 3
sample rates, whether waveIn-only, waveOut-only,
or full duplex.
The USB Audio was as good as the Realtek for 48000
Hz in all 3 modes.
For 44100 and 8000, it depended upon the mode:
waveOut-only: 44100 was actually 44000, while
8000 was nearly exact.
waveIn-only: 44100 was actually 44083, while 8000
was 8099.
For full-duplex, the results were the same as for
waveIn-only. The really strange part was that if
I then toggled waveIn off and just tested waveOut,
the effective sample rates did not drop back to
their original waveOut readings... I had to close
my app and restart to get back to the originals.
The USB Audio device not sold under any particular
brand name. It is a silver disk with rounded
edges, like a big M&Ms candy, that has 2 big black
buttons and a big white area that flashes red all
the time it is running. Top of it says "USB 5.1
Channel Audio Adapter". No manufacturer shown on
the outside or in the manual. Inside, it uses a
VIA VT1616 6-channel AC97 Codec chip, with a Sonix
controller chip... not sure which is the likely
culprit here.
Best regards,
Bob Masta
DAQARTA v4.51
Data AcQuisition And Real-Time Analysis
www.daqarta.com
Scope, Spectrum, Spectrogram, Sound Level Meter
FREE Signal Generator
Science with your sound card!