Audio Crackling or Stuttering

Hello everyone.

My objetive is to eliminate audio issues.

I have read here and watched on youtube videos very diferent configurations, but no one of them fixed my problem, I found a way to reduce, by setting Input driver as raw and Audio driver as openal, but my goal is not to just reduce, is to eliminate it, so I listen and enjoy clear audio.

The core I load is SNES Higan Accuracy, I downloaded the standalone higan emulator and I have no audio issues there, I guess it is worth to mention that I think Nvidia has something to do with this, because if I open retroarch the FPS counter of Nvidia Inspector displays at the left edge of the screen and it is detectable by shadowplay, so I can record a gameplay if I want, but if I open Higan, no FPS of Nvidia inspector is displayed neither can be recorded by shadowplay. All my v-sync settings in Nvidia Inpector is already off, and no matter if I set this ON or OFF on retroarch (My preference is ON here), the audio issue is still there.

Is it possible that Nvidia is trying to enhance Retroarch sound but it got this weird side effect? If yes, how can I disable it?

Is there anything I can do if I have already tried all audio driver combinations and no one fixed? The Wasapi driver is the only one that did no crackling sounds, but it stutter instead!

For refence: My notebook is a Acer Nitro 5 AN515-52, Windows 10 updated, Latest drivers installed, Retroarch is up-to-date.

I hope someone can help me.

1 Like

Unfortunately, there are quite a few things that could cause occasional crackling. Xaudio2 is usually pretty good for avoiding crackles, so switch back to it for the time being. The first things to try would be to make sure that your power consumption settings are at “max performance” (on that note, do all cores exhibit the problem or just demanding ones, like higan? If you turn on RetroArch’s FPS display, is it a solid 60 all the time or does it move around/drop?). After that, increasing the audio latency would be another good thing to try.

1 Like

Thanks for your answer hunterk.

I am a power user, I tweaked every settings in this Notebook to give a max performance over quality, my personal preference is high FPS in games than high graphics.

I used SNES9X core just to listen to MSU-1 music and I did not notice any crackles, just Higan is giving me some trouble, and the PS1 audio runs fine.

Something I forgot to mention earlier, is that it is even more noticiable in higher volumes, if I play at full, the crackles is unbearable, but this is not any hardware problem from my notebook, if I play the standalone higan emulator at full volume, there is no crackling like I have in Retroarch.

My FPS is locked by anything I set in Nvidia Inspector, I usually set this to 61 because the FPS fluctuates to down, so my FPS while gaming is 60/61, but I had tested to lock FPS on Nvidia Inspector as 60, 59 and even 58 and audio still crackles. But what do you mean by solid 60 FPS? A permanent FPS that no matter what it does not fluctuate? Is it even possible?

I did not tried increasing audio latency, but I have one noob question before do it, I play games on retroarch with V-sync turned ON, as far as I know, it makes the video and audio to perform together, if I increase audio latency, it would increase the delay between the action on screen and the sound I could hear? I would like to have no delay at all, or less possible. I really have to choose between fewer latency and crackling or no crackling but higher latency?

I checked here, the retroarch default latency is 64, and the standalone Higan emulator is 40, it does not make sense to me that increasing latency is the definitive solution.

getting good sync with both audio and video is tough. Standalone higan differs from RetroArch in a couple of ways (last I checked; using default settings in Windows): it syncs to audio but not video and it uses non-exclusive fullscreen.

Since the SNES runs slightly faster than most modern monitors (~60.01 fps, IIRC), if you sync to audio, you won’t get crackles (good) but the video refresh won’t line up so you’ll get tearing (more on this in a second) and a duplicated frame every couple of seconds (bad). If you sync to video, the audio buffer slowly empties as the slower refresh rate eventually starves the buffer, resulting in a crackle.

Since higan uses non-exclusive fullscreen, Windows DWM forces its own double-buffered(?) vsync, so you don’t get the tearing (good!), but it adds a couple of frames of input latency (bad).

You can achieve this same setup in RetroArch by disabling vsync, keeping audio sync on and enabling “windowed fullscreen mode” in settings > video > fullscreen.

However, RetroArch also does a thing called “dynamic rate control” (aka DRC; I think bsnes/higan have this for some drivers now, as well), which monitors the audio buffer and transparently speeds up / slows down the audio sample rate (below the threshold of human detection) to keep the audio buffer from emptying or overflowing–which causes a pop. This lets you run with vsync enabled so you get perfect scrolling and (ideally) no audio issues.

So, if DRC isn’t doing its job well enough, one of the things you can do to help (sometimes) is to increase the audio latency. Another thing is to disable audio sync while keeping video sync. You can also try increasing the “max timing skew” used by DRC to keep the buffer from emptying, though increasing it too much will cause the audio to be “warbly”.

2 Likes

Set it to “application preference” instead. Otherwise vsync will be forced off regardless of what you set it to within RA. From what I can tell, audio DRC depends on vsync.

2 Likes

“Application preference” does not exist, should I activate “Use the 3D application settings” instead?

I didn’t though that Nvidia inspector would bypass the emulator configurations and force off the settings inside, I though all this time that both v-sync would fight each other and this could result in video stuttering. (Not long time ago it happened to me on a low-end notebook, I disabled all v-syncs without care about video and audio delay, but now that I have a gamer notebook I want no delay between video and audio, so I want it ON.)

I searched about this and I found some information that tells that Windows 10 do not run in Exclusive Full Screen Mode, but instead it runs as some kind of hybrid borderless windowed mode that fit the screen, could be it? I read a lot of gamers who tells that had micro-stutterings and other issues even in high-end machines, but it’s gone when they disable it and runs at true full screen. All forums I have read about this only discussed about steam/windows games, could this issue affect emulators all well?

1 Like

Yes, exclusive fullscreen is very much preferred to windowed/borderless fullscreen for a number of reasons.

I didn’t figure it out how to setup games to run exclusive fullscreen, I followed some instructions, but it seems none of them work, because I can still see volume at the top left screen if I press Fn+Volume up/down, I can also fast alt+tab and the game don’t minimeze itself, if I press the windows button it open fast the start menu and the game keeps open on background. Do you know how can I set retroarch to exclusive fullscreen? I’d like to try it and see if it resolves.

it should just be a matter of going to settings > video > fullscreen and making sure “windowed fullscreen mode” is OFF. If that still doesn’t get it, something external is stopping it.

1 Like

Windows 10 has a new mode that works like borderless but without lag. DWM (the windows compositor) gets disabled when not needed so you can have vsync off and tearing. It gets temporarily enabled again when needed (for example to show the audio volume bar.)

Some applications use that new mode when setting them to use “exclussive fullscreen”. Whether or not that’s the case with RA, I don’t know :stuck_out_tongue: It might depend on which video driver you use.

2 Likes

If I let you know my video driver (how can I verify it?), could you tell me if it use the new exclusive fullscreen mode? What I have to do to figure if exclusive fullscreen mode is ON or OFF?

I can swear to you that I have no fullscreen in my video settings, that’s weird.

Edit: Oh, I’m so sorry, you mean on retroarch, and I tried on Windows Hahaha Found it.

1 Like