FNA-XNA / FAudio

FAudio - Accuracy-focused XAudio reimplementation for open platforms
https://fna-xna.github.io/
Other
555 stars 77 forks source link

Audio crackling and static in a few games #367

Open orbea opened 1 week ago

orbea commented 1 week ago

OS: Gentoo Linux: 6.12-rc7 Proton: experimental

Using alsa with HDMI audio in a few games such as Tales of Symphonia and Ys VIII: Lacrimose of DANA there will be constant crackling or static noise after a few minutes of playing. When starting the game everything will work correctly, but after a consistent amount of time the audio will break, in at Ys VIII muting the BGM in the settings will make it go away, but it will return when increasing the volume again.

Other games in the series such as Tales of Arise, Tales of Vesperia, Ys Origin and Ys X: Nordics are unaffected as are all other games I have played.

I tried older kernels going back to 5.15.x, Proton GE and older proton versions available in Steam without finding any good versions. Is this a FAudio issue? Alsa issue? Kernel issue? Game bug? A friend who does audio programming suggested that it sounds like an audio buffer is draining too fast. Is there anything that can be done to narrow this down or resolve this issue?

flibitijibibo commented 1 week ago

The best way to report these sorts of things is to go down the list in order:

Most bugs unique to Proton applications have to do with WMA support since decoding those is still kind of flaky; we don't decode it in upstream FAudio due to patent concerns. If it's ALSA that'll be something in Wine's ALSA driver since the Wine config uses WASAPI instead of SDL.

orbea commented 1 week ago

I neglected to mention that I did report it to proton without replies (Although did so only recently for Ys VIII).

https://github.com/ValveSoftware/Proton/issues/822#issuecomment-2326999328 https://github.com/ValveSoftware/Proton/issues/3820#issuecomment-2477846139

I will try making a wine issue too, but I'll try testing the GOG version of Ys VIII before I attempt that using vanilla wine and wine-staging if necessary.

orbea commented 1 week ago

I tested the GOG version using wine 9.21 and was unable to reproduce the issue so I am not sure its appropriate to make an issue for the wine tracker.

So if I understand correctly this implies proton or something about the combination of proton and FAudio? Is there a better way to bring attention to the issue on the proton tracker?

flibitijibibo commented 1 week ago

That all sounds right - I don't really know any way to bring attention to specific things, if I knew any method I'd probably be using them for native games instead!

orbea commented 1 week ago

Thanks for the replies, hopefully this can be addressed eventually.

orbea commented 1 week ago

As detailed in these two comments.

https://github.com/ValveSoftware/Proton/issues/3820#issuecomment-2487608381 https://github.com/ValveSoftware/Proton/issues/3820#issuecomment-2488881708

Running the Steam version of Ys VIII outside of Steam with wine-9.21 and wine-proton-9.0.3 built from the Gentoo repos avoids the audio issue while running the game with the same Proton version selected in Steam will reproduce the audio issue. Perhaps the problem is in neither Proton or FAudio, but in another part of the Steam ecosystem? Unless I am getting something wrong perhaps this issue should be closed?

flibitijibibo commented 1 week ago

That's plausible; system Wine most likely uses ffmpeg via GStreamer while Proton uses protonmediaconverter via GStreamer, again due to annoying patent issues.

orbea commented 1 week ago

Yes, I have ffmpeg enabled in Gentoo's media-plugins/gst-plugins-meta package, so that makes sense that the issue could be in protonmediaconverter.