Add audio buffer for WSLg stability

Increase mpv audio buffer to 2 seconds to fix stuttering on WSLg.

Ref: https://github.com/microsoft/wslg/issues/1257
This commit is contained in:
2025-12-11 20:04:49 +01:00
parent 4529fad61d
commit 7b4c664011
3 changed files with 247 additions and 2 deletions

View File

@@ -35,6 +35,7 @@ impl Player {
.arg("--no-terminal")
.arg("--profile=fast")
.arg("--audio-display=no") // Don't show cover art for audio files
.arg("--audio-buffer=2") // Larger buffer for WSLg audio stability
.arg(format!("--input-ipc-server={}", socket_path.display()))
.stdin(Stdio::null())
.stdout(Stdio::null())