libretro / tyrquake

Libretro port of Tyrquake (Quake 1 engine)
GNU General Public License v2.0
42 stars 46 forks source link

Ensure that only valid framerates are selected when 'Framerate' core option is set to 'Auto' #116

Closed jdgleaver closed 2 years ago

jdgleaver commented 2 years ago

At present, when the Framerate core option is set to Auto the framerate value is read directly from the frontend. This is a problem because the internal audio generation only works correctly at specific framerates - certain non-integer values cause resampling artefacts/crackling.

This PR sanitises the framerate read from the frontend, choosing the nearest value from the allowed framerate whitelist.

lgtm-com[bot] commented 2 years ago

This pull request introduces 1 alert when merging 1b6f98a2525939029e0be6d6148098d91a8ca5ae into 905e7d0b620061a0fc1ddafb4288ef2f251f021c - view on LGTM.com

new alerts: