Skip to content

VRR fast-forward recovery. - #19951

Open
Tatsuya79 wants to merge 5 commits into
libretro:masterfrom
Tatsuya79:vrr-ff
Open

Tatsuya79 wants to merge 5 commits into
libretro:masterfrom
Tatsuya79:vrr-ff

Conversation

@Tatsuya79

Copy link
Copy Markdown
Collaborator
  1. Removed the old workaround
  • Removed fastforward_after_frames and its five-frame delay.
  • Removed the temporary audio-blocking changes performed during those five frames.
  1. Improved fast-forward recovery
  • Immediately resets the frame pacing anchor, timer period, and frame-time history when fast-forward ends.
  • Allows VRR timing to resynchronize without waiting several frames.
  1. Added VRR-specific audio synchronization
  • With Exact Sync enabled and operational DRC, audio uses nonblocking writes.
  • The frame timer controls video pacing without waiting for the audio buffer.
  • DRC remains active to compensate for audio/video clock drift.
  1. Added reversible audio handling
  • If DRC becomes unavailable, the normal audio synchronization policy is restored.
  • Fast-forward, pause, and menu handling retain their existing policies.
  • Audio blocking is changed only when the requested state differs from the current state.
  1. Preserved existing audio processing
  • No changes to the DRC algorithm, resampler, timing skew, audio latency, or sink-rate estimation.

@Immersion95

Immersion95 commented Oct 30, 2026 •

Copy link
Copy Markdown

The fast-forward recovery fix works perfectly here! VRR actually feels even smoother overall, especially after closing and reopening a core. :)

I noticed one issue with 30 fps Dreamcast games, though: with frame-rate detection disabled, they appear to run at 60 fps and twice their intended speed. I’m attaching a test ROM with scrolling that should run at 30 fps to demonstrate this.

scrolltest30fps.zip

The interesting part is the frame pacing for flycast :

  • Before this PR: pacing was very uneven in 30 fps games with frame-rate detection disabled, so I needed to enable it.
  • With this PR: leaving that option disabled gives me smooth scrolling, but the game runs too fast.

Keeping this smoother pacing while preserving the correct game speed would make this even better. The original fast-forward issue is resolved in my tests, so this is already a very positive improvement!

@Tatsuya79

Copy link
Copy Markdown
Collaborator Author

I think Flycast is outside of libretro specifications, probably setting 60hz while sending audio samples for 30.
I'll have to check later.
Glad to hear it seems to be working as intended. 👍

@Immersion95

Immersion95 commented Oct 31, 2026 •

Copy link
Copy Markdown

There's this new "Vblank Pacing" option that helps a lot with Flycast : flyinghead/flycast#2562

Still not perfect 30 fps scrolling but a lot better than before without detect frame rate changes.

Unfortunately this Vblank option messes with detect framerate changes.

@Tatsuya79

Tatsuya79 commented Oct 31, 2026 •

Copy link
Copy Markdown
Collaborator Author

This has been committed to RA master branch as an attempt for equivalency, please check what it's doing for you:
591237d

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants