Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why did there is a non-FPS limit ? #188

Open
LaReunion974 opened this issue Aug 15, 2023 · 3 comments
Open

Why did there is a non-FPS limit ? #188

LaReunion974 opened this issue Aug 15, 2023 · 3 comments

Comments

@LaReunion974
Copy link

Games run so fast like every game i have tested.

@wheremyfoodat
Copy link
Owner

Hello
Yeah you're right, this should be implemented eventually. I wanted to do mixed sync like Redream at first (syncing to audio and video) but I will likely have to implement a temporary solution until audio is implemented.

@LaReunion974
Copy link
Author

Anyways the behavior of the game are funny sometimes

@NintendoManiac64
Copy link

NintendoManiac64 commented Aug 17, 2023

On a related note, I want to at least put out a sort of "ideal end goal" request that it be similar to the way Dolphin, mGBA, and Duckstation handle their FPS cap limiter where you can not only just specify what sort of FPS cap you want but it'll even sync the audio pitch accordingly so that you don't get weird and/or poor-quality sounding audio, especially when running at slower-than-native speeds.

In other words, if you cap a 60fps game to 30fps, it'd run both the game and audio at half-speed but also have the audio play back at half the sample rate and therefore subsequently half the pitch (e.g. a 1000Hz sine wave with a sample rate of 48kHz played back at half speed is identical to a bog-standard 500Hz sine wave with a sample rate of 24kHz).

Thing is, the alternative is the non-default audio mode that Dolphin calls "audio stretching" which, if I'm honest, just sounds pretty terrible fidelity-wise whenever you're running at less-than-native speeds. That being said, if your performance is fluctuating greatly, then I can see a situation where this "audio stretching" could actually sound better since having the audio pitch constantly going up and down would sound pretty terrible musically. And of course, when running at faster-than-native, "audio stretching" is the better choice since it's really doing audio squishing in such a case which has a far less impact on fidelity.

 

So I guess the tl;dr is:

matching audio pitch to the frame rate is better when:

  • emulation speed dips just a little below native speed

  • emulation speed is locked to a frame rate that is less than native

and "audio stretching" as Dolphin calls it is better when:

  • emulation speed wildly varies

  • emulation speed is locked to a frame rate that is greater than native

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

No branches or pull requests

3 participants