When I use Debian, I sometimes hear pretty heavy distortion, lags and crackling while listening to Spotify or playing games. These settings helped me fix the problem.
$ sudo nano /etc/pulse/daemon.conf # search for ; default-fragment-size-msec # remove the ; and set its value to something below 50 # for me it's working with 5 # save, quit and restart pulseaudio pulseaudio -k;pulseaudio --start