Recording misses a second here and there

Recently when I record on my Mac – using Audacity 2.1.2 or other apps like Audio Hijack – sometimes a second here, a second there is missing, as if the software is pausing at times. The recording I’m currently editing, which ran about 90 minutes, was fine for the first hour but has this problem more and more frequently in the last half hour, suggesting to me that it happens more the longer the recording gets.

This has only started happening in the last six months or so, on a MacBook pro I’ve had about five years. Is this a problem of harddrive space, or something else?

I’m on Mac OS X 10.11.6