Short gaps and repeats in recording. Latency? Buffering?

Hi. I record tracks from internet radio stations with Audacity and sometimes after recording a typical two minute track I play it back and find that a few gaps of a few milliseconds (say 2 to 10) duration have been inserted into the track, and /or a section of track a few milliseconds long has been replicated two or three times.
I associate this with other programmes running and the processor not coping but have not pinned it down. I used to get this before on a slower system and it could be caused just by moving the mouse. I wondered if changing my latency settings would make a difference? Currently it’s 100 to buffer and latency correction -130. Should these be changed in conjunction with each other? What is latency correction?

I use Ubuntu 12.04. Audacity 2.0.0, either installed from the software centre or came bundled, can’t remember…

That’s quite likely. Ubuntu can be quite demanding on hardware, particularly if the video card 3D acceleration is not up to scratch.
What Desktop do you use? The default “Unity” Desktop?

No, I use gnome classic. I much prefer it to Unity but am open to suggestion.

That was going to be my first suggestion :wink:

What are you trying to record from, and what settings do you have in the device toolbar?

I’m recording direct from the browser via the soundcard.
Audio device:ALSA
Output device : default (VT 8237/8251 HDA controler)
Input device: pulse:line: 0
Input channels 2 stereo

I have the pulse audio volume control, BTW

Sorry, yes you did mention that in your original post.

It sounds like you’ve got everything set up “correctly” or it wouldn’t be working as well as it is, so we need to see if we can tweak it a bit to prevent the glitches.

Latency correction:
Not relevant to what you’re doing, but for information; It takes a finite amount of time for audio to be read from disk and play through the headphones, and similarly a finite amount of time for audio to go into the sound card and end up recorded on the hard drive. When multi-track recording, (recording multiple tracks to build up a composition in layers), there would be a loss of synchronisation between successive “takes” due to these delays. The “delays” are called “latency”. Latency correction is an adjustment that Audacity can make when recording a second (3rd. 4th…) track to compensate for the delays so that if you play or sing in time with an existing track, the new track will be in time with the first track.

Audio buffer.
This could be relevant. During record / playback, data gets transferred to / from the hard drive in bursts, but recording / playback need to run continuously. To cope with this, Audacity temporarily stacks up a small amount of data in ram (the “buffer”). 100 ms is usually about right but it may be worth experimenting with different buffer sizes to see if you get improvement. Note that if the buffer is way too small then Audacity may stop recording at all, so don’t experiment during an important recording :wink:

OK, here’s how I see it: assuming that increasing the buffer time is more likely to be beneficial, I’ll try increasing it from 100 to 150 ms, the extra 50 ms should cover it, as it’s only about 10 ms max that is not accounted for by the existin level of buffering.That will be 0.15 second delay compared to 0.1, between what I am hearing and what is displayed in the audacity window?
Thanks for the info about correction.

If adjusting buffer does not help, there are many more suggestions here: .

One not listed there - close Nautilus (file manager) if you have it open.