Crackles on FCEUX emulator

Discuss NSF files, FamiTracker, MML tools, or anything else related to NES music.

Moderator: Moderators

Post Reply
Little Bitboy
Posts: 4
Joined: Thu Feb 22, 2018 9:40 am

Crackles on FCEUX emulator

Post by Little Bitboy »

Hello there,
I'm new to the forum so please be gentle. I'm using the NES tracker, NTRQ on FCEUX emulator and I'm experiencing some sound issues. I get some tiny little crackles and pops that seem to be coming from the DPCM channel. I'm running it on a PC laptop with Windows 10 64bit. I've tried all sorts of settings such as reducing screen reseloution, reducing and increasing sample rate, Vsync, Hardware acceleration, etc. Has anybody experienced a similar problem and fixed it? Am I being completely stupid and missing something very obvious?
Cheers
User avatar
dougeff
Posts: 3080
Joined: Fri May 08, 2015 7:17 pm

Re: Crackles on FCEUX emulator

Post by dougeff »

What version of FCEUX ?

Are you trying to record ?

Does it happen at the exact beginning of a sample ?
nesdoug.com -- blog/tutorial on programming for the NES
User avatar
rainwarrior
Posts: 8756
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: Crackles on FCEUX emulator

Post by rainwarrior »

I get this whenever I use vsync in FCEUX. I only really use FCEUX as a debugger so I've never needed to have vsync on for that, but normally for playing stuff i think vsync is pretty critical. :P
Little Bitboy
Posts: 4
Joined: Thu Feb 22, 2018 9:40 am

Re: Crackles on FCEUX emulator

Post by Little Bitboy »

dougeff wrote:What version of FCEUX ?

Are you trying to record ?

Does it happen at the exact beginning of a sample ?

It's version 2.2.3. I do record with it but it still crackles even when I'm not. It doesn't seem to happen at any specific point of the sample. Seems quite random.
User avatar
FrankenGraphics
Formerly WheelInventor
Posts: 2072
Joined: Thu Apr 14, 2016 2:55 am
Location: Gothenburg, Sweden
Contact:

Re: Crackles on FCEUX emulator

Post by FrankenGraphics »

Fceux audio tends to crackle when the computer is under enough load to not be able to run the emulation time consistently. It used to happen a lot on my older computers, but not so much now.
Little Bitboy
Posts: 4
Joined: Thu Feb 22, 2018 9:40 am

Re: Crackles on FCEUX emulator

Post by Little Bitboy »

I see. Anything I can do to reduce the load? Would running it on a different operating system help?
User avatar
FrankenGraphics
Formerly WheelInventor
Posts: 2072
Joined: Thu Apr 14, 2016 2:55 am
Location: Gothenburg, Sweden
Contact:

Re: Crackles on FCEUX emulator

Post by FrankenGraphics »

Wouldn't surprise me if it did matter a bit.

As for windows, it's the usual:
-remove redundant background services and applications, if any, from autostart
-don't run too many applications at the same time, also including any browser tabs that might tax the cpu.
User avatar
rainwarrior
Posts: 8756
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: Crackles on FCEUX emulator

Post by rainwarrior »

The crackling issue I get is whenever vsync is used, not related to CPU at all, but I'm not sure if I have the same problem as OP. (Or perhaps they are symptoms of the same cause... some bad synchronization with audio?)
User avatar
koitsu
Posts: 4201
Joined: Sun Sep 19, 2004 9:28 pm
Location: A world gone mad

Re: Crackles on FCEUX emulator

Post by koitsu »

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.
Little Bitboy
Posts: 4
Joined: Thu Feb 22, 2018 9:40 am

Re: Crackles on FCEUX emulator

Post by Little Bitboy »

That's really helpful. Thank you. I'll check my specs, give it a go and report back. Thanks everyone for your help.
Post Reply