Audio crackling/popping, but only during desktop animations

Hello again,
So I have been having a strange audio crackling issue on niri noctalia that I cannot figure out the source of.

I get crackling and popping if I am listening to something and I dare:

  • open mpv to look at a video. (the issue gets worse with larger files)
  • open swayimg to check photos. (moving around the gallery triggers it)
  • look at an extension page with animations in OSS Code.
  • open swayimg to look at a gif. (gif playback in swayimg triggers it regardless of size, it happens in firefox but only with massive several MB gifs)
  • switch focus to nautilus and triggering a change in transparency.
  • sometimes when switching workspaces.
  • games triggering it is spotty, factorio does not trigger it. Doom Eternal does, mainly during cutscenes, menu opening, and tutorial video displays (i barely started playing it lul)

I’d appreciate any help or ideas on the cause.

I have ruled out hardware issues as the issue persisted even after I bought an external USB DAC. (FiiO K5 Pro for whoever is insterested)

I dont have alot of experience here but I mind as well throw my hat into the ring.

Im assuming you have a PC because your running doom eternal, but it happening while animations are playing makes me think of a memory issue? Perhaps an out of date driver? Are you able to monitor your memory while its making the crackling noise?

Ive heard similar noises using a DAW (digital audio workstation) in browser while using certain instruments or having too many tracks playing ever since I switched to CachyOS. I havent figured out the cause but I imagine its somthing similar to your issue (like I said, i dont have alot of experience here).

Maybe try updating your audio drivers if your able. Sorry I cant be more help, I really hate seeing threads go abandoned with no answer. Good luck!