Actual Sample Rate slightly off? When capturing microphone audio, I noticed that my static buffer eventually overflows.
So I timed the samples, and low and behold I'm getting an actual sample rate of 44102-ish Hz (my timer is very accurate).
Is this the actual sample rate recorded by my microphone, or is windows sending me samples twice?
Doesn't this cause all sorts of synchronization problems. Say if you're listening to a live recording, wont a noticeable lag start to accumulate if sample rates aren't exact? How is this problem solved traditionally? Is dropping a sequence of samples, or padding zeros normal?
If you calculate the error, 44102/44100 is only about 45 parts per million. That is well within operating tolerance of many crystal oscillators used in consumer equipment to generate audio sampling rates and USB communication clocks. You can be quite pleased it is not even more off. Another problem is that if you simultaneously use different devices for audio capture or playback, they each have their own local clocks so they are not synchronized in any way and they all run free with their own local clockd, and thus you will have to do some kind of resampling to adapt the slight sampling rate differences.