skmp / reicast-emulator

Reicast was a multiplatform Sega Dreamcast emulator
https://reicast.emudev.org
Other
1.1k stars 345 forks source link

Reicast FPS drop/lag especially when audio is turned on. #1279

Open faxfrag opened 6 years ago

faxfrag commented 6 years ago

Hello, I'm using Reicast on Mi Mix2S device running on Android 8.

I'm experienced FPS drop to about 40fps and stuttering when audio turn is on. If I turn it off, it run on stable 60 fps just fine.

also I have to turn on Synchronous Rendering and Limit FPS otherwise Emu will run too fast.

Do I miss something in the settings to make this work correctly?

I try both stable version and beta version on Google Play, and they both have the same issue

MasterGamingYT commented 6 years ago

What are your device specs?

AbandonedCart commented 6 years ago

@MasterGamingYT https://www.gsmarena.com/xiaomi_mi_mix_2s-9067.php

It should run normally with the default settings. It is possible the existing audio drivers are not compatible with your hardware. The audio thread is typically what controls the overall speed of the emulator, which is why you need the other settings when it is disabled.

skmp commented 6 years ago

I’ve had this happen before in some HTC phone, it was a mis-configured alsa driver in the phone’s kernel. Do other low latency apps work correctly?

On Wed, 15 Aug 2018 at 04:09, Abandoned Cart notifications@github.com wrote:

@MasterGamingYT https://github.com/MasterGamingYT https://www.gsmarena.com/xiaomi_mi_mix_2s-9067.php

It should run normally with the default settings. It is possible the existing audio drivers are not compatible with your hardware. The audio thread is typically what controls the overall speed of the emulator, which is why you need the other settings when it is disabled.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/reicast/reicast-emulator/issues/1279#issuecomment-413063992, or mute the thread https://github.com/notifications/unsubscribe-auth/AAYAMql7h-tsmt9xQZJArGcvtKwuTP34ks5uQ3TegaJpZM4V5HYt .

faxfrag commented 6 years ago

Hi, I want to clarify of what happen and what the problem is. since I think my previous comment is not quite clear.


I test two games Shenmue and Ikaruga and results are the same.

My default setting is below (I left some option that I think is not relevance)


the game run very stable at 60fps by looking at on screen FPS but the game run too fast and audio isn't working but if I turn on FPS Limiter the fps drop to around 23-27, the game is lagging but the audio work

If leave limit frame rate on and turn off Emu Sound the game get back to 60 fps and run too fast just like when I turn on audio but disable FPS limiter

So summary of what happen:


Now If I use default setting as I mention above but now I turn on Synchronous Rendering it's getting better but not much

The game still run too fast 60fps with FPS Limit off and no Audio but Not as fast as above, If I turn on FPS Limit, the audio will start working again but fps drop to the same as above around 24 but less laggy as above

AbandonedCart commented 6 years ago

@faxfrag What about with other low-latency audio apps, as @skmp was asking?

Even with the new details, it still sounds like an issue with the audio drivers on the device.

faxfrag commented 6 years ago

@AbandonedCart , I don't know about low-latency audio app. do you have any recommendation for me to try?

If it's the problem with the audio driver on the device, does trying to update Rom version or flashing to other Rom fix it?

My current Rom is MIUI 9.5.4.0 on Mi Mix2S.

AbandonedCart commented 6 years ago

I don't know if @skmp had anything specific in mind, but you may have to wait for him on that.

Flashing something else may fix it. It may not. It depends on if there were fixes for it and if the kernel developer included them.

Blaze08 commented 6 years ago

this is same occuring on my device, is it possible to fix it? yeah when i turn off sound emu it just run fast forward and then turn on again lag and drop fps.... the issue is after that sound emu is disabled

jzombie999 commented 5 years ago

Hi, I want to clarify of what happen and what the problem is. since I think my previous comment is not quite clear.

I test two games Shenmue and Ikaruga and results are the same.

My default setting is below (I left some option that I think is not relevance)

* Show on Screen FPS

* Unstable Optimization =  Off

* Use Mipmaps = On

* WideScreen Mode = Off

* Force Software Rendering = Off

* Disable Emulator Sound = Off

* Rendering Depth = 24

* Use EGL45 GLCFactory = On

* Dynarec Option = On

* Limit FPS = Off

* PVR Rendering = Off

* Synchronous Rendering = Off

* Enable Modifer Volumes = On

the game run very stable at 60fps by looking at on screen FPS but the game run too fast and audio isn't working but if I turn on FPS Limiter the fps drop to around 23-27, the game is lagging but the audio work

If leave limit frame rate on and turn off Emu Sound the game get back to 60 fps and run too fast just like when I turn on audio but disable FPS limiter

So summary of what happen:

* What Happen 1 - The game run too fast with 60 fps without Audio : FPS limit off + Audio on / FPS limit on + Audio off / FPS limit off + Audio off

* What Happen 2 - The game is lagging around 25 fps wtih Audio: FPS limit On + Audio On

(also I feel like the game even run faster if I turn on Turbo mode in What Happen 1)

Now If I use default setting as I mention above but now I turn on Synchronous Rendering it's getting better but not much

The game still run too fast 60fps with FPS Limit off and no Audio but Not as fast as above, If I turn on FPS Limit, the audio will start working again but fps drop to the same as above around 24 but less laggy as above

To disable sound is not recommended. You only need to choose Dynarec instead of interpreter in cpu mode via Advanced tab. You will have to choose Dynarec repeatly after you launch Reicast. That option doesn't have the ability to make it as default.

@faxfrag What about with other low-latency audio apps, as @skmp was asking?

Even with the new details, it still sounds like an issue with the audio drivers on the device.

The answer is to choose Dynarec instead of interpreter in cpu mode via Advanced tab. Interpreter is the one that caused the game go slower. Don't forget to choose Dynarec repeatly after you launch Reicast. That option doesn't have the ability to make it as default.

Sincerely, jzombie999 (Tester)