Ardour stuttering out of the blue

A few days or so ago I started having this issue with Ardour. (I think it may have started after Ubuntu updated some software, but I’m not really sure.) All my other programs run fine.

Sometimes I open Ardour and when I try to play tracks, it slows way down and basically stutters. As if it’s playing the track(s) in super slow motion with a tremolo effect on everything. It feels like the program is just grinding nearly to a halt. I think it is playing a fraction of a second of sound and then freezing for a fraction of a second before playing the next tiny segment and freezing again.

It seems to happen when my computer has been running for a long time. If I close and open the program again, it does the same thing. So I reboot my laptop and then Ardour works fine again for a while. But it’s annoying having to reboot. Is anybody else having this issue? Any ideas why this is happening?