Skip to content

Calculate refresh rate needed to be in sync with audio #2247

@Zerowalker

Description

@Zerowalker

Is your feature request related to a problem? Please describe.
I Believe Higan or Bsnes had this feature at some point.
Basically if you do just video sync the audio will most likely go out of sync (glitch out as the buffer run out or overflow etc).
So would it be possible to calculate what refresh rate is needed to keep the audio stable.
So with that refresh rate (for that console, as it of course will differ) you can just use video sync and not audio sync,
and the audio will be stable.
(To do this perhaps you can do a audio sync run for awhile, and see what the average fps is at).

Describe the solution you'd like
You click a "Calculate Refresh Rate" or similar, it does it's thing and you get a refresh rate that's needed to keep the audio stable for the specified console/s.

Describe alternatives you've considered
My manual attempt at this is to run with just audio sync for awhile,
and record the frame timings, then calculate the average fps from it.
It seems to work decently, but as it's taken from the video renderer instead of just from the "audio sync intervals" directly,
it's probably not super accurate.

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions