armory3d/armory

Krom and Windows (C) builds playing at a higher speed with 120hz monitor.

moisesjpelaez opened this issue · 2 comments

Description
Krom and Windows (C) builds are played at a higher speed. The Krom build also plays the audio at a higher pitch.

To Reproduce
Open the project's .wav files
Run the project with Krom Runtime.
Run the project with Browser Runtime.
Compare the differences.

Expected behavior
To run the game at a normal speed on Windows Builds (same speed as browser builds).

System
Blender: 3.6.10 LTS
Armory: 2024.02
OS: Windows 11 Home (x64)
Graphics card: NVIDIA GeForce RTX 3050 Ti Laptop

Test File
Can be tested with the sound example. The handle spins faster on Windows builds (both C and Krom) and the audio pitch is higher with Krom.

Note: I haven't tested Mac or Linux builds.

image
image

It seems the problem is in kha.System.refreshRate in Krom builds, as is giving me 60 instead of 120 as shown in the images.