Random comments from me in passing:
* I've seen/experienced this myself many times over the years, but I have it under control for the most part at this point
* What video card model you're using matters. AMD vs. nVidia vs. Intel all play a role. Different video cards' drivers implement Vsync differently (and some even override it to be disabled no matter what the application wants)
* Fullscreen vs. windowed also seems to matter (or at least it did when I was using Windows XP; not sure about 7 now -- people tell me it's less of a problem on 7 in general, but I've found plenty of games which behave differently in windowed vs. fullscreen on 7)
* The Sound Latency slider under Config -> Sound is also relevant -- if the buffer is too small crackling can happen. The behaviour of this seems to vary per soundcard too
* I still don't know what "Use Global Focus" does
* I also get brief crackling/desynced audio when the application loses and regains focus, but this is pretty common in a lot of emulators (IIRC, Mesen is one which doesn't do this, probably because of how Sour implemented everything)
* Hardware timers matter greatly when it comes to proper A/V sync and audio buffering in general. Windows is a notorious jerk about providing insights into what hardware timer it's using. There is a tool called
DPC Latency Checker that can help see if you're having high latency which can cause crackling or oddities in audio especially.
In general,
I DO NOT use FCEUX to play NES games. I use Nestopia or Mesen or BizHawk for that. Those three offer a better overall experience. Like rainwarrior, I primarily use FCEUX for debugging/development/hacking.
My settings, just for the record, for Windows 7 Ultimate SP1 x64 with an nVidia GTX1060 and on-board sound (Realtek ALC887 using Realtek driver version r281 (r282 has all sorts of systray problems)):
* I use windowed mode exclusively
* Config -> PPU -> New PPU (I'm unsure if this has relevancy; I assume New PPU takes up more CPU time emulation-wise but I'm out of my element)
* Config -> Video -> Windowed Settings -> Special filter: none
* Config -> Video -> Windowed Settings -> Sync method: Wait for VBlank
* Config -> Video -> Windowed Settings -> DirectDraw: No hardware acceleration
* Config -> Video -> Sound -> Buffering -> [x] Use Global Focus
* Config -> Video -> Sound -> Buffering -> Sound Latency -> 48 (see below)
* Config -> Timing -> [x] Set high-priority thread
You can't see the exact number for Sound Latency in the UI (sigh), you have to open up fceux.cfg in Notepad -- and it's a very wonky/unique file format -- but search for soundbuftime and look at the number right after.