Take the 2-minute tour ×
Raspberry Pi Stack Exchange is a question and answer site for users and developers of hardware and software for Raspberry Pi. It's 100% free, no registration required.

My usb microphone appears to be dropping samples, producing very glitchy recordings which are about 5% shorter than they should be. Here's an example recording of a periodic wave:

440 Hz test tone

You can clearly see pieces of the wave missing. This happens using both arecord and SoX's "rec" command, at all bit depths and sampling rates.

[Edit:] The glitches are irregularly spaced from between 5-100 ms apart, and happen at all amplitudes, bit depths, and sampling rates. I have the latest firmware, updated today.

Any ideas about where to start troubleshooting this?

share|improve this question
    
Are you running the latest firmware? Older firmwares produced glitchy, unusable data from USB DACs I tried them with. –  scruss Dec 16 '12 at 16:19
    
I updated again just now to verify - no change. –  meetar Dec 17 '12 at 21:36
add comment

3 Answers

I looked at this question the other day but your image was missing. Looking at it now, it's clear your waveform is being "snipped" in places.

I've had similar problems - audio loss during mic recordings - when the gain was set too high in alsamixer; check your levels. Clipping could be the culprit of this problem.

share|improve this answer
    
The glitch is constant, and happens at all amplitudes. The wave in the image above is at about -24db. –  meetar Dec 17 '12 at 21:37
    
If your capture device supports DB boost, set it to zero. Failing that, look for some better drivers (preferably from the manufacturers website). –  Munkeh Dec 18 '12 at 13:23
    
DB boost is already at 0 in alsamixer. The manufacturer doesn't offer drivers - it's a Samson Go USB mic, advertised as "plug-and-play." I'll try looking for other drivers elsewhere. –  meetar Dec 20 '12 at 0:05
    
That's a condenser mic, which will probably require a bit more power. Are you using a USB hub? If not, I would advise doing so as the Pi power supply won't be enough –  Munkeh Dec 20 '12 at 12:45
    
I'm not using a hub - I'll try to round one up, and try again. –  meetar Dec 31 '12 at 16:35
show 2 more comments

Just had a look at the waveform in the picture and it looks like it coould be missing samples possibly due to the processor having to perform other tasks (multi-tasking) and taking time-out to service an interrupt or another process.

You could try temporarily shutting-down other services while making recordings and see if that helps. My first target would be any internet conectivity as this might be connecting peridically as a background task and interrupting your recording software.

share|improve this answer
add comment

In case someone has a similar issue.

I have measured the exact same behaviour with my Samson GoMic USB microphone. The issue could be completely resolved, by using a modified kernel. There is a comfortable way to do this:

sudo BRANCH=fiq_split rpi-update

You can find out more about it here

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.