flyinghead / flycast

Flycast is a multiplatform Sega Dreamcast, Naomi, Naomi 2 and Atomiswave emulator
GNU General Public License v2.0
1.37k stars 167 forks source link

Resident Evil 2 - music/sound stuttering #1062

Open KamiLordus opened 1 year ago

KamiLordus commented 1 year ago

Transitioning between locations, opening inventory, or maps noticeably cuts/stutter the music/sound. I've tried different core options but nothing helps. I tested the game in CHD and GDI format. I'm using RA 1.15 with the latest version of the Flycast core. OS Win 11

HyperSonic1999 commented 1 year ago

Also had this issue yesterday and just found a workaround. Disabling "Threaded Rendering" should stop it from cutting out when changing screens, only downside is that screen transitions take 2 or less seconds to load instead of just 1 second with TR on. Edit tried this on both GL and Vulkan video driver and get the same issue and solution.

KamiLordus commented 1 year ago

@HyperSonic1999 thanks a lot. After disabling threaded rendering the game works normally.

HyperSonic1999 commented 1 year ago

@KamiLordus No prob, hope you enjoy.

flyinghead commented 1 year ago

reopening since this doesn't look right

sappergr commented 11 months ago

Using the flatpak version of Flycast (not sure if relevant) Videos seems to freeze if not using VGA cable method. Edit: in the appimage version its incredibly choppy no matter the settings.

mfigueirido commented 11 months ago

Exact same behaviour on Alone In The Dark - The New Nightmare. There's lots of audio stuttering specially noticable when changing screens. Fixed by disabling threaded rendering but then screen load times go from almost instant to taking around a second.

tmmmmm commented 2 months ago

Installing a bios-file fixed the video/audio-stuttering for me. (on Steam Deck, running Flycast v2.3 standalone)

TessArdent commented 1 month ago

Although disabling thread rendering does fix it, "Detect Frame Rate Changes" is a much better solution. The audio transition is still not smooth, but I think that's just a symptom of the game loading the next angle much quicker. Set Core Options > Video > Detect Frame Rate Changes to OFF (in RetroArch - not sure about other distributions). I also added dc_boot and dc_flash to my bios. I'm not sure if that's necessary, but it did add the dreamcast opener when I launch RE2.

mfigueirido commented 4 weeks ago

Made some more testing regarding this with refreshed Retroarch and Flycast core. Used a real bios file and "Detect Frame Rate Changes" was off. On my side there's simply no way to get clean audio when using the RA core. With "Threaded Rendering" enabled the audio cuts during any kind of transition. With "Threaded Rendering" disabled a different kind of sound stuttering kicks in. This one happens everywhere rather than during transitions. Super easy to spot during RE2's intro FMV, but present during all gameplay sections.

This happens as well in Alone in the Dark, Sega Rally 2 and probably many other games: https://github.com/flyinghead/flycast/issues/1211

mfigueirido commented 4 weeks ago

Managed to get it working right. This is what I did:

  1. Disable "Threaded Rendering".
  2. In Retroarch's menu go to Settings->Video->Synchronization and set "Max Swapchain Images" to 4. If you don't do this some sporadic stuttering will remain.
  3. Ensure you don't have the SH4 CPU overclocked, or the overclock is not big at least. In my tests Resident Evil 2 could be overclocked up to 300Mhz with no sound stuttering, while Sega Rally 2 only accepts up to 250 Mhz.

This way the game will play perfectly except that when switching camera angles there will be some slowdown that "Threaded Rendering" fixes.