https://bugs.winehq.org/show_bug.cgi?id=51921
Bug ID: 51921 Summary: Audio problems and crashes with Unreal Engine 4 due to error in F3DAudio.c:349 Product: Wine Version: 6.20 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: zerooneo@01101001.net Distribution: ---
Created attachment 70879 --> https://bugs.winehq.org/attachment.cgi?id=70879 The error message.
When one runs the games Obduction or RiME , which are both based on Unreal Engine 4, with Wine commit d8be85863fedf6982944d06ebd1ce5904cb3d4e1 or later, noise is output instead of audio, and an error occurs in F3DAudio.c, line 349, and the error message "pDspSettings->DstChannelCount == ChannelCount && "Invalid channel count, DSP settings and speaker configuration must agree"" is shown. Screenshots are attached. The game will then exit or eventually crash.
This commit and the previous one makes use of new code to process audio, so the error seems directly related to that.
https://bugs.winehq.org/show_bug.cgi?id=51921
--- Comment #1 from David Oftedal zerooneo@01101001.net --- Created attachment 70880 --> https://bugs.winehq.org/attachment.cgi?id=70880 The error message.
https://bugs.winehq.org/show_bug.cgi?id=51921
David Oftedal zerooneo@01101001.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Regression SHA1| |d8be85863fedf6982944d06ebd1 | |ce5904cb3d4e1 CC| |zerooneo@01101001.net
https://bugs.winehq.org/show_bug.cgi?id=51921
Fabian Maurer dark.shadow4@web.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |dark.shadow4@web.de Keywords| |regression
--- Comment #2 from Fabian Maurer dark.shadow4@web.de --- Is there a demo or free game to test with?
https://bugs.winehq.org/show_bug.cgi?id=51921
--- Comment #3 from David Oftedal zerooneo@01101001.net --- I'm afraid I don't have one on hand. However, I did test it with a third UE4-based game, Ether One Redux, and the same issue arose there, so we're probably talking about a rather wide range of games.
I might suggest just picking a game from https://en.wikipedia.org/wiki/List_of_Unreal_Engine_games#Unreal_Engine_4 and seeing if that can reproduce the issue.
https://bugs.winehq.org/show_bug.cgi?id=51921
Rémi Bernon rbernon@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |rbernon@codeweavers.com
--- Comment #4 from Rémi Bernon rbernon@codeweavers.com --- The main difference is that the Linux version of FAudio, provided by the Linux distribution, was previously used, and it was generally built with assertions disabled, where Wine now uses its own PE version of FAudio, which has assertions enabled.
That assertions may be genuine or not, and I believe it comes from a difference between calls to X3DAudioInitialize with a channel mask, and to X3DAudioCalculate with a channel count which doesn't match the initial channel mask. It'll probably require some tests to validate whether it should assert or not.
Also see https://github.com/FNA-XNA/FAudio/pull/255
https://bugs.winehq.org/show_bug.cgi?id=51921
--- Comment #5 from David Oftedal zerooneo@01101001.net --- Created attachment 70892 --> https://bugs.winehq.org/attachment.cgi?id=70892 The error message.
https://bugs.winehq.org/show_bug.cgi?id=51921
--- Comment #6 from David Oftedal zerooneo@01101001.net --- Presumably, if the error can be corrected, then it makes sense to have the assert there, whereas if the error lies in a largeish number of already published games, using a popular engine, and which may or may not include Fortnite, then it doesn't make as much sense.
https://bugs.winehq.org/show_bug.cgi?id=51921
--- Comment #7 from Rémi Bernon rbernon@codeweavers.com --- Sure, but then it's actually pretty much an Unreal Engine bug, as they should use this API the way it's supposed to be, and not trigger assertions.
From the Unreal Engine source I can see that they check the audio device
properties to get the initial channel mask, but then hardcode the number of DSP settings channels to 6, regardless of how many channels were specified at initialization.
I also checked with debug native DLL from the DirectX SDK that this assertion is genuine, and an exception is raised (and explicit debugstr messages printed), so all Unreal Engine games would also fail here.
I think the only correct thing to do here is to build Wine FAudio with assertions disabled, and that would restore the original behavior.
https://bugs.winehq.org/show_bug.cgi?id=51921
Rémi Bernon rbernon@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Fixed by SHA1| |babaf916ab12c7a9128409f7178 | |78919ccc5826b Resolution|--- |FIXED
--- Comment #8 from Rémi Bernon rbernon@codeweavers.com --- Should be working now.
https://bugs.winehq.org/show_bug.cgi?id=51921
--- Comment #9 from David Oftedal zerooneo@01101001.net --- Thank you very much. At the time of writing (compiled from commit e73bb07ff59d0d0b7925df3d642299689275b0a8), all 3 of the previously tested games are indeed working perfectly. This does appear to have resolved the issue.
https://bugs.winehq.org/show_bug.cgi?id=51921
Zebediah Figura z.figura12@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |gazports@gmail.com
--- Comment #10 from Zebediah Figura z.figura12@gmail.com --- *** Bug 51927 has been marked as a duplicate of this bug. ***
https://bugs.winehq.org/show_bug.cgi?id=51921
Zebediah Figura z.figura12@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|Audio problems and crashes |Multiple games crash due to |with Unreal Engine 4 due to |assertion failures in |error in F3DAudio.c:349 |bundled FAudio (Unreal | |Engine 4 games, Skyrim SE) Component|-unknown |xaudio2
https://bugs.winehq.org/show_bug.cgi?id=51921
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #11 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 6.21.