Rhythm game has a 165 ms delay running on mobile

Godot Version

4.5.1

Question

Hi, I made a rhythm game that works fine on the desktop. To compensate what is going on at the screen for the delay in the music being played, I used the values:

AudioServer.get_output_latency()
AudioServer.get_time_to_next_mix()

The problem happens when the game is running on a Android phone. There AudioServer.get_output_latency() always returns zero, and the notes in the screen are showing up 165 ms before the beat in the audio. I already created a config screen offering a universal offset to be applied and got the game running as expected. Even so, I wonder if there is something I missed in order to compensate for the delay in the audio when running the game on the mobile device. Let me know.

Thanks

AudioServer.get_output_latency() may not be implemented on Android. Search if there’s any issue opened about it in the issue tracker or open a new one describing the problem.