Dolphin, the GameCube and Wii emulator - Forums

Full Version: Audio stutter on some games - potential fix
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

Pheidian

Hi guys!

First time here, just started checking out the Dolphin emulation for mainly Gamecube gaming.


Anyway, I had quite constant 60fps on a game like Baldur's Gate, but the fps dropped in the intro sequence already from 60 to 40 and audio went to crap, distorted mess. I tried various things, lowering quality etc but always the same
problem with audio crapping on me, even if the gameplay was ok.

I found a solution that atleast works for my setup: Go to Config -> Advanced and lower the CPU Clock override to 50%. That fixed the stutter for once. So maybe new processors or similar are running things too fast and garble up the sounds
when shaders are calculated or similar - not a coder, but this is what worked for me.

Also not sure if there's already information about this, sorry if this is already common knowledge.

I'm just loving the emulator so far - thanks for all who have put time into it!
(04-08-2020, 05:13 PM)Pheidian Wrote: [ -> ]I found a solution that atleast works for my setup: Go to Config -> Advanced and lower the CPU Clock override to 50%. That fixed the stutter for once. So maybe new processors or similar are running things too fast and garble up the sounds
when shaders are calculated or similar - not a coder, but this is what worked for me.

No, the problem was that your computer was running too slow. You will get audio slowdown if Dolphin isn't running at 100% speed. What you do by decreasing the CPU clock is making the emulated console lag, so that your computer doesn't have to be as fast in order to run at 100% of the speed of the emulated console.

Pheidian

So what you're saying is that my 2990wx Ryzen overclocked is not fast enough?
For Balder's Gate as it is currently emulated, yes.

It's not that your PC is bad or anything. The current situation with how that particular game behaves in Dolphin is just problematic. The only other solution right now is to just throw an ungodly amount of processing power at it. I don't have the game myself to look into if there's something it's doing that hits a slow path of Dolphin or it does something that's incredibly expensive to emulate, but these games have been problematic for a long time.

Lowering the GameCube's CPU clock essentially makes the game run on half the power, which brings it within the realm of running on modern computers - at the cost of the game handling the lag of running on weaker emulated hardware.

Pheidian

Ok, why does it show 60fps on emulator even though I lower the cpu? I might wanna do comparison recording for this, since to me it seems when I lower the clock, the stuttering goes away and framerate seems to be better even in the problematic places. As in somewhere it shows 35fps on 100% cpu - but for example baldur's gate shows only drop to 55fps on those problem parts with 80% cpu (been tweaking around). - also the visual speed and fps seems more fluid with dropped cpu, it doesnt seem slowed down, rather more smooth.
(04-09-2020, 05:52 PM)Pheidian Wrote: [ -> ]Ok, why does it show 60fps on emulator even though I lower the cpu? I might wanna do comparison recording for this, since to me it seems when I lower the clock, the stuttering goes away and framerate seems to be better even in the problematic places. As in somewhere it shows 35fps on 100% cpu - but for example baldur's gate shows only drop to 55fps on those problem parts with 80% cpu (been tweaking around). - also the visual speed and fps seems more fluid with dropped cpu, it doesnt seem slowed down, rather more smooth.

What you are actually doing is downclocking the GameCube CPU speed from 485MHz to the percentage of what you are specifying (e.g. 50% = half the speed = 242.5MHz). So because you are doing that it becomes easier to emulate the CPU in the GameCube with your physical CPU. It very much possible that the game doesn't actually use the full GameCube CPU speed to be able to run the game at 60FPS and by making it easier to emulate the GameCube CPU you are able to hit the 60FPS. The thing is if you downclock the CPU too much, it will start missing frames even though it might run at 60FPS ingame, you will see stuttering (a.k.a. dropped frames). As always keep in mind that messing with the emulated clockspeed can severely mess up your game to the point that stuff doesn't work, glitches out or completely breaks the game. But it is well known that Baldur's Gate is notoriously hard to emulate, and even my rig, with a i9 9900k @ 5.1GHz, 3400MHz CL16 Dual Channel DDR4 and a RTX2080TI that is heavily overclocked to 2010MHz Core avg. and 16GHz vRAM has some drops every now and then.