Severe sound lag in wine #233
Labels
No labels
Bug
Extensions
New Feature
Not our bug - SDL2
Not our bug - WMA
Utilities
Wine
X3DAudio Accuracy
XACT Accuracy
XAudio2 Accuracy
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
gh-FNA-XNA/FAudio#233
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I'm using the latest wine from git.
I'm using the latest faudio from git locally, with gstreamer/libav support enabled.
Running skyrim with xaudio2_6 and xaudio2_7, the game runs as expected
Running skyrim with faudio (built-in), audio effects are delayed by 1-5 seconds
In both cases, audio quality is exceptional. The only problem I am seeing is an exceptional audio delay.
I can capture WINEDEBUG logs for this, but they are quite noisy. They do look substantially different between the versions.
You're most likely looking at something involving PULSE_LATENCY_MSEC and SDL, not FAudio itself - we just write to the OS output buffer that SDL gives us, we don't dig any deeper than that.
I tested with alsa and pulse backends, with and without pipewire. The problem follows only faudio/xaudio, not backend changes.
My first thought was that this was buffer bloat in the audio framework, hence testing with multiple different ones.
I'll capture WINEDEBUG, the output is quite different between them. The audio quality is perfect, just delayed with faudio. I'd prefer to use faudio for several reasons.
You will want to check with SDL separately then - we're nothing more than a sample mixer, so any delay of any kind is always, at minimum, one level below us.
Glad to dig more. I'm not sure if sound is actually globally delayed, which is complicated by that particular game using multiple audio systems. Some audio effects require libav decoding, not sure if the delayed ones are going in that path, which is probably another opportunity for shenanigans. Interestingly there is no delay in effects until actually playing the game using FAudio, which also makes me suspicious of multiple sound sources interacting poorly somewhere.
Doing a bit of spring cleaning...
This should be filed as an SDL bug if it's still an issue, but I would strongly recommend looking at Pipewire - even for working setups I noticed reduced latency just from using Pipewire's Pulse layer, I imagine the direct Pipewire driver in SDL 2.0.16 will be really good too. Either way, closing as NOTOURBUG.