Soundcard Verification
I was recording analog audio into my computer (FreeBSD) using my
external Edirol UA-25 USB soundcard. The audio sounded a little but
funny, but I wasn't sure. I thought that perhaps audio was being
dropped, as if the audio were a tape and a few millimeters were
being cut out here and there. To test this hypothesis, I connected
a 35-Hz triangle wave generator to the sound card input, and
recorded one minute of audio. Then I wrote a little program to
calculate the difference between each sample and the sample before it.
If the recorded waveform is a true triangle wave, there should be
only two values for the slope, rising and falling. If there are
skips, it will (most likely) lead to some sample having a very
different value than its predecessor. I sorted the output of the
differencing program so that the biggest differences were at the
top of the output. There were no big differences. My hypothesis
about data being dropped was wrong. Anyway, I'm glad I now have
a procedure for testing for dropped data.