https://bugs.winehq.org/show_bug.cgi?id=50162
Bug ID: 50162 Summary: msvcrt-Math_Precision patchset breaks audio in Diablo III Product: Wine-staging Version: 5.22 Hardware: x86-64 URL: https://www.blizzard.com/download/confirmation?platfor m=windows&product=d3 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: maciej.stanczew+b@gmail.com CC: leslie_alistair@hotmail.com, z.figura12@gmail.com Regression SHA1: 7734f7a8087291ec15c4d1adfe1a6db055972266 Distribution: ArchLinux
Created attachment 68678 --> https://bugs.winehq.org/attachment.cgi?id=68678 Use precise_cosh in unix_cosh instead of unix_cos
Steps to reproduce: 1. Lower your audio volume to not break ears; 2. Launch Diablo III ("wine Diablo\ III64.exe -launch").
Expected result: Menu music starts playing, UI sounds work.
Actual result: There is about 2 seconds of loud, garbled audio, then silence.
I've bisected this to msvcrt-Math_Precision patchset and its latest rebase. Wine 2fb08bed46f + Staging 0192a7b3 don't have the issue. Wine c72e1b096d1 + Staging 7734f7a8 is where the problem is introduced. Building Staging 5.22 with "-W msvcrt-Math_Precision" also produces a working version.
Looking at the patchset's rebase (7734f7a8), we see that precise_cosh was used in unix_cos instead of unix_cosh. Reverting unix_cos to use cos, and using precise_cosh instead in unix_cosh, solves the issue for me. I've attached a patch with these changes.
https://bugs.winehq.org/show_bug.cgi?id=50162
Maciej Stanczew maciej.stanczew+b@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |regression
https://bugs.winehq.org/show_bug.cgi?id=50162
Olivier F. R. Dierick o.dierick@piezo-forte.be changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |cybermax@dexter.no
--- Comment #1 from Olivier F. R. Dierick o.dierick@piezo-forte.be --- *** Bug 50161 has been marked as a duplicate of this bug. ***
https://bugs.winehq.org/show_bug.cgi?id=50162
Olivier F. R. Dierick o.dierick@piezo-forte.be changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |o.dierick@piezo-forte.be Keywords| |patch
--- Comment #2 from Olivier F. R. Dierick o.dierick@piezo-forte.be --- Hello,
Also affects Unigine Superposition benchmark audio.
Adding patch keyword.
Regards.
https://bugs.winehq.org/show_bug.cgi?id=50162
Olivier F. R. Dierick o.dierick@piezo-forte.be changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|msvcrt-Math_Precision |msvcrt-Math_Precision |patchset breaks audio in |patchset breaks audio in |Diablo III |multiple applications | |(Unigine Superposition; | |Diablo III)
https://bugs.winehq.org/show_bug.cgi?id=50162
Alistair Leslie-Hughes leslie_alistair@hotmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Fixed by SHA1| |f257f37b92041fc718de04aa83e | |c3139b748ffa2 Status|UNCONFIRMED |RESOLVED
--- Comment #3 from Alistair Leslie-Hughes leslie_alistair@hotmail.com --- Fixed by https://github.com/wine-staging/wine-staging/commit/f257f37b92041fc718de04aa...
https://bugs.winehq.org/show_bug.cgi?id=50162
--- Comment #4 from Maciej Stanczew maciej.stanczew+b@gmail.com --- Confirming that on Wine bedfb9cae22 + Staging f257f37b the issue is fixed. Thank you for a very quick reaction.
https://bugs.winehq.org/show_bug.cgi?id=50162
Alistair Leslie-Hughes leslie_alistair@hotmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |kungfujesus06@gmail.com
--- Comment #5 from Alistair Leslie-Hughes leslie_alistair@hotmail.com --- *** Bug 50245 has been marked as a duplicate of this bug. ***
https://bugs.winehq.org/show_bug.cgi?id=50162
--- Comment #6 from kungfujesus06@gmail.com --- I just applied this patch and I'm still getting the screeching audio. Do I have to create a new wine prefix from scratch or something?
https://bugs.winehq.org/show_bug.cgi?id=50162
--- Comment #7 from Zebediah Figura z.figura12@gmail.com --- (In reply to kungfujesus06 from comment #6)
I just applied this patch and I'm still getting the screeching audio. Do I have to create a new wine prefix from scratch or something?
Probably not. Does the bug occur if you use upstream (non-staging) wine?
https://bugs.winehq.org/show_bug.cgi?id=50162
--- Comment #8 from kungfujesus06@gmail.com --- Hmm, seems the 9999 build in Gentoo is working so maybe my user patch is being applied somewhere too late before things are copied for the build stage, I dunno, :-/. Seems to be fixed, though, sorry about the noise.
https://bugs.winehq.org/show_bug.cgi?id=50162
zappel@retarded.farm changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |zappel@retarded.farm
--- Comment #9 from zappel@retarded.farm --- (In reply to kungfujesus06 from comment #8)
Hmm, seems the 9999 build in Gentoo is working so maybe my user patch is being applied somewhere too late before things are copied for the build stage, I dunno, :-/. Seems to be fixed, though, sorry about the noise.
Hey, I had the same issue (on gentoo, at least for wine-staging-5.22-r2 this isn't fixed)
this user-patch fixed it for me:
## patch start --- a/dlls/msvcrt/unixlib.c 2020-12-08 03:58:08.157002766 +0100 +++ b/dlls/msvcrt/unixlib.c 2020-12-08 04:05:01.763530290 +0100 @@ -221,7 +221,7 @@ */ static double CDECL unix_cos( double x ) { - return precise_cosh( x ); + return cos( x ); }
/*********************************************************************
## patch end
https://bugs.winehq.org/show_bug.cgi?id=50162
--- Comment #10 from Zebediah Figura z.figura12@gmail.com --- That hunk has already been addressed upstream; perhaps the Gentoo repositories are out of date.
https://bugs.winehq.org/show_bug.cgi?id=50162
--- Comment #11 from ZappeL zappel@retarded.farm --- Yeah sorry - gentoo doesn't have this patch upstream (except the "9999" ebuild, which is "upstream"), it was just for completeness.
https://bugs.winehq.org/show_bug.cgi?id=50162
--- Comment #12 from kungfujesus06@gmail.com --- No I wasn't implying that Gentoo's ebuild is up to date, just merely the user patches I applied to it (e.g. the user patches it will apply before building) didn't seem to work. I likely translate the patch to a patch wrong somehow or maybe it applied it to a source directory that wasn't directly used for building. Directly apply the patch to patch is not feasible as the user patches get applied after all the wine-staging patches do. In any case, upstream looks great.
https://bugs.winehq.org/show_bug.cgi?id=50162
Olivier F. R. Dierick o.dierick@piezo-forte.be changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |roidal@googlemail.com
--- Comment #13 from Olivier F. R. Dierick o.dierick@piezo-forte.be --- *** Bug 50307 has been marked as a duplicate of this bug. ***
https://bugs.winehq.org/show_bug.cgi?id=50162
Zebediah Figura z.figura12@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #14 from Zebediah Figura z.figura12@gmail.com --- Closing bugs fixed in wine-staging 6.0-rc1.