TASEmulators / fceux

FCEUX, a NES Emulator
http://fceux.com
GNU General Public License v2.0
1.21k stars 251 forks source link

Sound goes out of sync with v-sync on especially in Full Screen mode #687

Open AstarOfDavid opened 9 months ago

AstarOfDavid commented 9 months ago

The sound goes out of sync (mostly in) Full Screen mode on (but not only). I am currently using an ASUS Essence ST/STX (PCI and PCIe) sound cards - I've also tested with my Sound Blaster ZxR PCIe sound card AND an external USB2.0 Creative Labs Sound Blaster OMNI - the results are exactly the same no matter which sound card I use.

The sound issue occurs when video hardware acceleration or surface ram is set with any form of sync - no matter what settings I've tried (including all sound options / latency global focus etc). No matter which sound card driver. It also does not matter which version/build of FCEUx I use 32/x64 etc If I do not turn on hardware acceleration/vsync then the video will run a solid 60.1 fps and tear/jerk/stutter around say about every 7 or 8 seconds.... but audio is fine. If I do turn hardware acceleration/v-sync on then audio will stutter but the frame rate is a solid 60.0 fps with no tearing.

I have attached this audio clip: https://github.com/TASEmulators/fceux/assets/156493571/129caaa5-cc12-48ee-a8c8-dff17ef63862

(It sounds like a crackling pops/clicks - sounding like timing / sync issues). I've waited through multiple version to post this (as I assumed the issue was know and would be addressed)

I have a high end system (so it's not likely my PC is too slow) AMD 3850x (16c/32t) 32GB of very low latency Trident Royal DD4 3200 AMD 6800xt 16GB video card ASUS x570 motherboard ASUS Xonar Essence ST (and an STX) Windows 10 x64

Note* I seem to recall trying the On Board sound and it still having the same issue.

(PLEASE ALSO NOTE: I right click on FCEUX and set Compatibility for DPI scaling to "Let Application set screen mode" so I get square pixels - not windows scaled image) I've also tested "Run Windows Compatibility Troubleshooter" - which also did not fix the problem.

thor2016 commented 8 months ago

This is a known issue with the older win32 GUI. You may want to the try the Qt/SDL win64 version of fceux. In that version, the emulation runs in its own thread and which keeps the vsync function from interfering with its timing. Its the timing change that messes up the audio in the older GUI.

thor2016 commented 8 months ago

Duplicate of #666