If your computer has a Wi-Fi adapter, this very often causes MASSIVE latency spikes, which then mess up sound quality and introduce dropouts and crackles and all of that sort of stuff.
What lots of folks do with their Wi-Fi adapters is to temporarily disable them or if there is a hardware on/off switch they turn the adapter OFF, just prior to launching Sonar.
When finished using Sonar, they then 'enable' the Wi-Fi adapters again, or turn 'on' if they were turned off.
This is an easy fix to the Wi-Fi-adapter induced latency problems.
This is a really simple and harmless thing to do, by the way. Just go to Device Manager, find the Wi-Fi adapter in the list of devices, right-click on it, then click 'Disable'. Please note that this does NOT remove the drivers from your system, it just literally disables it so the drivers are not loaded while it is disabled. When you enable it again, it simply loads the already installed drivers for it, and everything is hunky dory again. (if one were to UNINSTALL the Wi-Fi adapter drivers, then you would have to scan for hardware changes again to get it to work again, so don't do that - just disable/enable)
Sooooooo, please give the above a shot, and post back. I used to do this probably 5-10 times a day, when I was working on projects and also working on other things with the computer in between Sonar recording/editing/mixing/mastering sessions.
I hope the above helps you get a better sound quality with reduced or even eliminated dropouts and such,
Bob Bone