Skip to content

Add option to reduce audio latency using scrcpy #22

Closed
@DerpyChap

Description

@DerpyChap

Waydroid appears to have a significant amount of audio latency, to the point where rhythm games become impossible to play unless you adjust the audio latency in the game's settings.

By using scrcpy, you can significantly reduce the amount of audio latency.

Using the game Cytoid as an example, here's the amount of measured end-to-end latency in the game's calibration tool when using Waydroid's audio playback:

15324628_20240204220644_1

When running scrcpy --audio-buffer 30 --audio-codec=raw --no-video-playback --tcpip=[WAYDROID_IP_ADDRESS]:5555 via SSH I measured the following latency:

15324628_20240204221513_1

For a rough idea of how this compares to an actual Android device, I ran the same test on my Sony Xperia 1 II.

Screenshot_20240204-222604

This results in roughly half the end-to-end audio latency of Waydroid's native audio output, and brings things much closer to an actual Android device. I tried lower values for --audio-buffer, but it resulted in some noticeable popping in the audio. I haven't noticed any issues in more demanding games that I have tested, but despite that it might be best to make such a feature default off just in case.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions