Horrible clicking and popping sounds

I am running Windows 10 under version 2.4.1. Whether it is a single or multi track project, I hear a random clicking or popping sound throughout the project. When I export the project to a 32-Bit WAV file and play it with the Groove media player, it does not glitch. Also, the input tracks to the project in WAV format do not glitch but do so once imported into the project. I have re-installed Audacity and reset the preferences. What am I doing wrong?

After searching more through the forum, I tried increasing Audacity CPU priority in the Task Manager to Above Normal and disconnected the internet. Neither of these suggestions helped. The waveform does not show any of the clicks or pops. I have narrowed down the problem to playing under WASAPI. Playback works fine under MME and DirectSound. I was under the assumption that WASAPI was better than either of the other two. Is there a Windows setting that I can correct to make WASAPI play without the glitches? Otherwise, which is better, MME or DirectSound? Thanks for the help…

Same here. Try play back in MME and see if that cures the problem.

What happens when you try changing the buffer size: Edit > Preferences > Devices ?