https://bugs.winehq.org/show_bug.cgi?id=38206
Bug ID: 38206 Summary: Sound clicks in Blizzard's "Heroes of the Storm" and "Diablo 3", and also some slightly annoying clicking in "World of Tanks". Product: Wine Version: 1.7.34 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: wineoss.drv Assignee: wine-bugs@winehq.org Reporter: HASH.DuOrden@gmail.com Distribution: ---
Created attachment 51001 --> https://bugs.winehq.org/attachment.cgi?id=51001 log generated as it suggested in http://wiki.winehq.org/Sound from output of Diablo 3.
I am on Gentoo x86-64 multilib, OSSv4.
After performing http://wiki.winehq.org/RegressionTesting I found that the culprit commit is d301254e72f018c3e04272115e20ffc70ffcbc12.
It is enough to revert wineoss.drv/mmdevdrv.c part of this commit to "fix" this regression.
In "Heroes of the Storm" and "Diablo 3" there is a settings in "Option -> Sound -> Quality -> Sound Quality:". But only in "Heroes of the Storm" it helps if I set this to "Low", then the clickering is reduced to once a minute or so. But in "Diablo 3" this setting do not change anything. In "World of Tanks" this only noticeable in hangar and when I view destroyed tank during a battle.
And here is regression final output: 301254e72f018c3e04272115e20ffc70ffcbc12 is the first bad commit commit d301254e72f018c3e04272115e20ffc70ffcbc12 Author: Andrew Eikum aeikum@codeweavers.com Date: Wed Dec 17 09:28:13 2014 -0600
mmdevapi: More accurately track device position.
:040000 040000 d2d3ae33a3b768fb03324d6c038bbcd79d9742d0 ec4be94754d577889ba445bd40dd097c9f2043f7 M dlls
https://bugs.winehq.org/show_bug.cgi?id=38206
hash HASH.DuOrden@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |aeikum@codeweavers.com
--- Comment #1 from hash HASH.DuOrden@gmail.com --- Adding commit author: Andrew Eikum aeikum@codeweavers.com
https://bugs.winehq.org/show_bug.cgi?id=38206
hash HASH.DuOrden@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Regression SHA1| |d301254e72f018c3e04272115e2 | |0ffc70ffcbc12
https://bugs.winehq.org/show_bug.cgi?id=38206
--- Comment #2 from hash HASH.DuOrden@gmail.com --- Just noticed the error in regression output here is correct: d301254e72f018c3e04272115e20ffc70ffcbc12 is the first bad commit commit d301254e72f018c3e04272115e20ffc70ffcbc12 Author: Andrew Eikum aeikum@codeweavers.com Date: Wed Dec 17 09:28:13 2014 -0600
mmdevapi: More accurately track device position.
:040000 040000 d2d3ae33a3b768fb03324d6c038bbcd79d9742d0 ec4be94754d577889ba445bd40dd097c9f2043f7 M dlls
https://bugs.winehq.org/show_bug.cgi?id=38206
hash HASH.DuOrden@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |regression
https://bugs.winehq.org/show_bug.cgi?id=38206
--- Comment #3 from Andrew Eikum aeikum@codeweavers.com --- Thanks for the nice bug report. I'll try reproducing this soon on my Arch Linux box. If I can't, I might give you a patch to try to add some more debug info, since the OSS driver is pretty quiet.
https://bugs.winehq.org/show_bug.cgi?id=38206
abi abi@abinet.ru changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |abi@abinet.ru
--- Comment #4 from abi abi@abinet.ru --- I don't want to be overdramatic, but this one is blocker for me on FreeBSD 10.1 (OSS), so I'm sticking with 1.7.33 The sound is distorted beyond recognition in all applications if I (or OS) applies load to CPU like there is a race condition somewhere in the code. Problem is introduced in d301254e72f018c3e04272115e20ffc70ffcbc12 commit (as reporter found). One can easily trigger the issue with some yes > /dev/null & commands.
https://bugs.winehq.org/show_bug.cgi?id=38206
--- Comment #5 from Andrew Eikum aeikum@codeweavers.com --- I can reproduce this on Arch Linux with oss-git ac48ed. I'll dig further into this and see what I can find.
https://bugs.winehq.org/show_bug.cgi?id=38206
--- Comment #6 from Andrew Eikum aeikum@codeweavers.com --- Created attachment 51167 --> https://bugs.winehq.org/attachment.cgi?id=51167 wineoss.drv: Don't skip over frame advancements less than one fragment
I've attached a patch here that I think will fix this. I still need to test it more before submitting. Can you give it a test and see if it fixes your issues?
https://bugs.winehq.org/show_bug.cgi?id=38206
--- Comment #7 from abi abi@abinet.ru --- I tested the patch on FreeBSD and found the issue has gone. Thank you!
https://bugs.winehq.org/show_bug.cgi?id=38206
Andrew Eikum aeikum@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |932f392e08980cff3bf74dfdfd3 | |5fc10f10364fd Status|UNCONFIRMED |RESOLVED Resolution|--- |FIXED
--- Comment #8 from Andrew Eikum aeikum@codeweavers.com --- Thanks for testing! This should be fixed by this commit which will be in Wine 1.7.40. Please re-open if it's still not working for you.
commit 932f392e08980cff3bf74dfdfd35fc10f10364fd Author: Andrew Eikum aeikum@codeweavers.com Date: Wed Apr 1 12:20:41 2015 -0500
wineoss.drv: Don't skip over position updates of less than one fragment.
https://bugs.winehq.org/show_bug.cgi?id=38206
--- Comment #9 from hash HASH.DuOrden@gmail.com --- Just compiled latest git: wine --version wine-1.7.39-303-gd46e6fe And tested Diablo 3 and clicks are there. Tested "Heroes of the Storm" and clicks are there also. So I'm afraid this bug is far from fixed.
https://bugs.winehq.org/show_bug.cgi?id=38206
Andrew Eikum aeikum@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|FIXED |--- Ever confirmed|0 |1
--- Comment #10 from Andrew Eikum aeikum@codeweavers.com --- Thanks. Can you get another log? That patch also added a lot more debug text.
https://bugs.winehq.org/show_bug.cgi?id=38206
--- Comment #11 from abi abi@abinet.ru --- Please, don't rollback the patch. It really fixed the issue for me :) I played Pillars of Eternity for 2 hours and my sound was not distorted.
https://bugs.winehq.org/show_bug.cgi?id=38206
--- Comment #12 from hash HASH.DuOrden@gmail.com --- Created attachment 51188 --> https://bugs.winehq.org/attachment.cgi?id=51188 log http://wiki.winehq.org/Sound for "Diablo 3" with wine-1.7.39-303-gd46e6fe.
If I understood correctly you, Andrew Eikum, it's enough to get log with just normal compile of wine, without reverting 932f392e08980cff3bf74dfdfd35fc10f10364fd and applying your patch from attachment 51167.
https://bugs.winehq.org/show_bug.cgi?id=38206
--- Comment #13 from Andrew Eikum aeikum@codeweavers.com --- Created attachment 51193 --> https://bugs.winehq.org/attachment.cgi?id=51193 wineoss.drv: Cap reported OSS fill level to expected level
Thanks Hash, that's exactly what I needed. Looks like your device is reporting the buffer has more frames in it than we ever wrote, which was causing an integer underflow. I've attached a patch that accounts for that. Can you try it out?
https://bugs.winehq.org/show_bug.cgi?id=38206
--- Comment #14 from hash HASH.DuOrden@gmail.com --- Created attachment 51194 --> https://bugs.winehq.org/attachment.cgi?id=51194 log http://wiki.winehq.org/Sound for "Diablo 3" with wine-1.7.39-303-gd46e6fe and attachment 51193.
All looks good with Your attachment 51193, Andrew Eikum, no clicks, no distortion, realy clear and nice sound here.
Thank You very much Andrew Eikum for a really good and fast fix for this!
I've added log just so if You'd like to see if all good and tidy.
https://bugs.winehq.org/show_bug.cgi?id=38206
Andrew Eikum aeikum@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1|932f392e08980cff3bf74dfdfd3 |025e6650e4378771a4fd1a872be |5fc10f10364fd |bfbfb2b2b72d7 Status|REOPENED |RESOLVED Resolution|--- |FIXED
--- Comment #15 from Andrew Eikum aeikum@codeweavers.com --- (In reply to hash from comment #14)
Created attachment 51194 [details] log http://wiki.winehq.org/Sound for "Diablo 3" with wine-1.7.39-303-gd46e6fe and attachment 51193 [details].
All looks good with Your attachment 51193 [details], Andrew Eikum, no clicks, no distortion, realy clear and nice sound here.
Thank You very much Andrew Eikum for a really good and fast fix for this!
I've added log just so if You'd like to see if all good and tidy.
Thanks for reporting and testing! This is now in Wine and will be included in Wine 1.7.41.
commit 025e6650e4378771a4fd1a872bebfbfb2b2b72d7 Author: Andrew Eikum aeikum@codeweavers.com Date: Mon Apr 6 08:21:48 2015 -0500
wineoss.drv: Cap reported OSS fill level to expected level.
https://bugs.winehq.org/show_bug.cgi?id=38206
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #16 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 1.7.41.
https://bugs.winehq.org/show_bug.cgi?id=38206
Andrew Rutherford andrewr-winehq@iagu.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |andrewr-winehq@iagu.net
--- Comment #17 from Andrew Rutherford andrewr-winehq@iagu.net --- I've found what I think is a bug with this patch. :-(
I too was getting sound clicks in a Blizzard application, in this case World of Warcraft. Although this patch has certainly fixed the clicks, instead the application constantly behaves as if it has lost window focus - I have "Sound in Background" disabled, and a lower maximum frames per second when in the background. As I'm playing suddenly and simultaneously the keyboard no longer responds, the sound stops, and the frame rate drops. Mouse clicks immediately re-enable normal behaviour, while the colour of the window manager's decorations shows the window manager thinks the Blizzard application has focus throughout.
Although not a seasoned Wine debugger, I've determined (by reinstalling old versions) this behaviour appears in lock-step with this patch - reverting to older Wine builds I have no pseudo-focus-loss events, but the clicking is apparent.
FreeBSD 10.1, with XFCE in "Focus follows Mouse" mode - and I play on a laptop and pretty much ignore the trackpad which is not being touched when this occurs.
Games unaffected by the clicking don't seem to have any focus issues.
https://bugs.winehq.org/show_bug.cgi?id=38206
--- Comment #18 from Andrew Eikum aeikum@codeweavers.com --- Thanks Andrew. That sounds like a different bug than the one described here, right? It could be a coincidence that the release that contains this commit causes that bug.
Could you open a new bug and CC me on it?