https://bugs.winehq.org/show_bug.cgi?id=38497
Bug ID: 38497 Summary: Il-2 Sturmovik 1946: Engine sound plays from only one speaker Product: Wine Version: 1.7.39 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: fremenzone@poczta.onet.pl Distribution: ---
Created attachment 51345 --> https://bugs.winehq.org/attachment.cgi?id=51345 /proc/asound/cards
I'm experiencing problems with sound when playing Il-2 Sturmovik 1946 (digital version from GOG.com). I always hear engine sound from only one speaker. So if turn my head right I hear it only from the left speaker, if I turn head left I hear the sound from the right speaker. And if I happen to have my view centred then sound plays from one speaker for about a second, then switches to the second speaker and goes on like that. When I switch to the gunner position I don't hear engine at all. I'm playing this on a laptop and have only two speakers. In-game settings are set to "headphones". I can't compare how this sound on windows but I guess this is not what it should be.
I am attaching some information found in /proc/asound. Please say if any other information is necessary.
https://bugs.winehq.org/show_bug.cgi?id=38497
--- Comment #1 from Janek fremenzone@poczta.onet.pl --- Created attachment 51346 --> https://bugs.winehq.org/attachment.cgi?id=51346 /proc/asound/devices
https://bugs.winehq.org/show_bug.cgi?id=38497
--- Comment #2 from Janek fremenzone@poczta.onet.pl --- Created attachment 51347 --> https://bugs.winehq.org/attachment.cgi?id=51347 /proc/asound/modules
https://bugs.winehq.org/show_bug.cgi?id=38497
--- Comment #3 from Janek fremenzone@poczta.onet.pl --- Created attachment 51348 --> https://bugs.winehq.org/attachment.cgi?id=51348 /proc/asound/version
https://bugs.winehq.org/show_bug.cgi?id=38497
--- Comment #4 from Bruno Jesus 00cpxxx@gmail.com --- Please try again in wine 1.7.41, some similar issues have been fixed since 1.7.39, after updating also take a look at winecfg audio tab to check if the speaker configuration is correct.
https://bugs.winehq.org/show_bug.cgi?id=38497
--- Comment #5 from Janek fremenzone@poczta.onet.pl --- I just updated my wine to 27042015 snapshot (ie. today's snapshot). I've configured all sound devices detected by wine to be stereo. Sound is noticeably different now. When I look exactly forward in a level flight I can barely hear any engine sound, just a silent buzz somewhere in the background. If I rotate my head sound appears in one of the speakers except that now it gets louder gradually (the farther aside I look the louder it gets, achieving a maximum when I look 90 degrees sideways) whereas previously this was binary. If I turn my head left or right as far as possible (ie. backwards) engine sound completely disappears. Other sounds (eg. machine guns) seem to be correct.
https://bugs.winehq.org/show_bug.cgi?id=38497
--- Comment #6 from Janek fremenzone@poczta.onet.pl --- As an experiment I downgraded wine to version 1.4. Engine sound works perfectly with this version so this is a regression in the newer versions of wine. Not everything is perfect though. In the game menu clicking an entry triggers a sound of clicking. Under wine 1.4 this sound is played twice, whereas in the latest snapshot it is correctly played just once.
https://bugs.winehq.org/show_bug.cgi?id=38497
Bruno Jesus 00cpxxx@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |aeikum@codeweavers.com
https://bugs.winehq.org/show_bug.cgi?id=38497
--- Comment #7 from Andrew Eikum aeikum@codeweavers.com --- I gave this a test with the version in Steam, which appears to be "4.12.2m". I picked a plane with the propeller at the front, the Corsair I, and turned the view left and right. Sound seemed to be working as I expected.
Can you give me some more info about your setup? Are you using PulseAudio? If so, what version?
Using the latest version of Wine available to you, can you give me a log with the channels from http://wiki.winehq.org/Sound? Play the game just long enough to reproduce the problem, then quit and compress the log (xz works well) before uploading here.
https://bugs.winehq.org/show_bug.cgi?id=38497
Janek fremenzone@poczta.onet.pl changed:
What |Removed |Added ---------------------------------------------------------------------------- Regression SHA1| |3ba100d81c8c2de783f0e4b57d7 | |e190ca8ec47ea
--- Comment #8 from Janek fremenzone@poczta.onet.pl --- Andrew,
first to answer your question, no I don't use PulseAudio. Just ALSA.
I spent some time yesterday with git bisect to locate the faulty commit. It was tedious but successful. The problems began in:
commit 3ba100d81c8c2de783f0e4b57d7e190ca8ec47ea Author: Mark Harmstone hellas@burntcomma.com Date: Tue Jan 6 19:27:10 2015 +0000
dsound: Support quadraphonic sound.
With that commit I can still hear engine sound from both speakers when facing forward, however one speaker is slightly louder than the other. This can be heard especially when changing facing from left to right or right to left when there is a noticeable jump in volume level between both stereo channel. It's not a big jump but it is noticeable. When I turn my head backwards one channel goes mute (this was present in wine 1.4 and fixed somewhere along the way - see below). The problem gets worse with the next commit:
commit 77b2ab21f45bc6773f539f2ae04edbf9cf09ac48 Author: Mark Harmstone hellas@burntcomma.com Date: Tue Jan 6 19:27:21 2015 +0000
dsound: Support 5.1 sound.
This introduces the originally reported problem: engine sound can be heard from only one speaker.
Note also that on my machine I was able to obseve several other issues with sound:
* looking backwards (ie. more than 90 degrees left or right from the forward direction) makes one of the channels silent (left when looking left, right when looking right). This is present in wine-1.4. This problem seems to have been solved in later versions and then reintroduced in 3ba100d81c8c2de783f0e4b57d7e190ca8ec47ea * clicking on menu buttons causes the click sound to be played twice. Again, present in wine 1.4, gone in newer versions. * when looking backwards approx. 110 degrees one of the channels turns mute. Sound can be heard again from that channel when turning more than 110 degrees. In other words there is a small mute area in each direction when looking slightly backwards. Present in the commit just before 3ba100d81c8c2de783f0e4b57d7e190ca8ec47ea (subsequent commits make the whole channel go mute so there is no chance to observe this). * when playing the click sounds in the menu first sound played after launching the game is too quite. All subsequent click sounds have correct, higher volume. Present in all versions of wine.
For now I only want to focus on the originally reported bug. Once it is fixed and other bugs remain I will report them separately.
I'm attaching debug logs as you requested. These were generated with wine built from commit abd673bde93b76a361ddf7342c538c2dd99af2bd. To create these I launched the game, went into Quick Mission Builder, clicked "Fly" and once the game loaded I looked slightly left, slightly right, then quit the mission and the game.
My machine uses 2.6.37 kernel. That's quite old but I realized I can probably upgrade it to 3.0 from my distribution's repositories. Maybe that will solve the problem but in that case I will not be able to provide any further feedback. So, should I upgrade the kernel to see if the problem disappears?
I hope all of this helps. If I can do anything else to assist please let me know.
https://bugs.winehq.org/show_bug.cgi?id=38497
--- Comment #9 from Janek fremenzone@poczta.onet.pl --- Created attachment 51369 --> https://bugs.winehq.org/attachment.cgi?id=51369 Sound logs
https://bugs.winehq.org/show_bug.cgi?id=38497
--- Comment #10 from Andrew Eikum aeikum@codeweavers.com --- No, this is almost certainly a Wine bug. Our 3D sound implementation mostly works, but it's not very accurate and has a lot of broken corner cases.
I'll dig into your log and get back to you.
https://bugs.winehq.org/show_bug.cgi?id=38497
--- Comment #11 from Andrew Eikum aeikum@codeweavers.com --- Created attachment 51372 --> https://bugs.winehq.org/attachment.cgi?id=51372 Additional channel debugging
Janek, I'm starting to think there's a bug in our handling of the winecfg channel options. Can you apply this patch to latest Wine, build dsound, and then retest and get me another log? Please ensure your winecfg settings match your physical speaker layout (stereo, I believe).
https://bugs.winehq.org/show_bug.cgi?id=38497
Sebastian Lackner sebastian@fds-team.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |regression CC| |hellas@burntcomma.com, | |sebastian@fds-team.de
https://bugs.winehq.org/show_bug.cgi?id=38497
--- Comment #12 from Janek fremenzone@poczta.onet.pl --- Created attachment 51373 --> https://bugs.winehq.org/attachment.cgi?id=51373 Sound logs after patching f7e09276227e23a17626b292279326e51b2b2708
https://bugs.winehq.org/show_bug.cgi?id=38497
--- Comment #13 from Janek fremenzone@poczta.onet.pl --- Andrew, I attached sound logs after applying your patch. However - to my total surprise - I have to say that the problem is gone. Sound is PERFECT. Not a single glitch, no channels getting mute, nothing. Well, the first click in the game is still too quiet but that's not a problem.
I'm trying to find a reasonable explanation for this. One would be that one of the commits in the last two days fixed this but I find that would be too simple. What I realized just now is that during bisecting I did not run winecfg to set up all my devices to stereo. In hindsight, this was stupid. However, when I first reported this problem with 1.7.39 I am 100% certain I did set all the devices properly. Then again when I upgraded wine to newer versions I never cleaned my ~/.wine directory. So perhaps the problem is indeed in handling channel configuration by winecfg (possibly after an upgrade?).
https://bugs.winehq.org/show_bug.cgi?id=38497
--- Comment #14 from Andrew Eikum aeikum@codeweavers.com --- Looking at your log, I was wondering if that was the case :) Your recent log uses 2 channels instead of 6 like the old log.
There was only one large change between 1.7.39 and 1.7.41, which was the channel configuration UI in winecfg was redesigned to be easier to understand. Possibly you were interpreting the old UI incorrectly (see Bug 38006), and it was set up for 5.1 mode all along.
If it's OK with you, I think we'll close this as INVALID.
That said, I do think we should default to Stereo unless we're more certain about the user's physical speaker setup. Stereo is by far the most common configuration, so I think we'd have less user confusion if we just used Stereo most of the time.
https://bugs.winehq.org/show_bug.cgi?id=38497
--- Comment #15 from Janek fremenzone@poczta.onet.pl --- Yes, please close as INVALID. Defaulting to stereo sounds good. On my laptop some of the devices default to stereo, some to 5.1, which is a nit nonsense given that I only have two speakers.
https://bugs.winehq.org/show_bug.cgi?id=38497
Andrew Eikum aeikum@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |INVALID
--- Comment #16 from Andrew Eikum aeikum@codeweavers.com --- I will work on having saner defaults. Thanks for your patience in the meanwhile, glad we've got it sorted out!
https://bugs.winehq.org/show_bug.cgi?id=38497
--- Comment #17 from Janek fremenzone@poczta.onet.pl --- Quite interestingly, I installed binary snapshot package from my distribution's repository and the problem is present in that snapshot. This time I didn't do anything silly like keeping my old ~/.wine. Interesting. Still the repo version works fine.
https://bugs.winehq.org/show_bug.cgi?id=38497
Andrew Eikum aeikum@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Resolution|INVALID |DUPLICATE
--- Comment #18 from Andrew Eikum aeikum@codeweavers.com --- (In reply to Janek from comment #17)
Quite interestingly, I installed binary snapshot package from my distribution's repository and the problem is present in that snapshot. This time I didn't do anything silly like keeping my old ~/.wine. Interesting. Still the repo version works fine.
Oh wait! I think I've found the bug! You're running a 64-bit prefix, aren't you? It looks like winecfg fails to update the 32-bit half of the registry. So your changes in winecfg don't take effect in 32-bit programs like Sturmovik.
Probably your wine-git build was 32-bit, but the Wine distributed by Arch is 64-bit, which is why you see the difference in behavior.
This is a duplicate of Bug 38313, I'll update further progress there.
*** This bug has been marked as a duplicate of bug 38313 ***
https://bugs.winehq.org/show_bug.cgi?id=38497
--- Comment #19 from Janek fremenzone@poczta.onet.pl --- (In reply to Andrew Eikum from comment #18)
You're running a 64-bit prefix, aren't you?
I don't know. However:
but the Wine distributed by Arch is 64-bit
Yes, wine from openSuse's repositories is 64-bit.
Probably your wine-git build was 32-bit
I would guess that it is because when I built wine from git and tried running it without removing ~/.wine directory created earlier by 64-bit wine from repo it complained something about 64bits and refused to run.
Does that make sense?
https://bugs.winehq.org/show_bug.cgi?id=38497
--- Comment #20 from Andrew Eikum aeikum@codeweavers.com --- (In reply to Janek from comment #19)
(In reply to Andrew Eikum from comment #18)
You're running a 64-bit prefix, aren't you?
I don't know. However:
but the Wine distributed by Arch is 64-bit
Yes, wine from openSuse's repositories is 64-bit.
Sorry, getting confused about people related to this bug.
Probably your wine-git build was 32-bit
I would guess that it is because when I built wine from git and tried running it without removing ~/.wine directory created earlier by 64-bit wine from repo it complained something about 64bits and refused to run.
Does that make sense?
Yeah. If you try to run a 32-bit-only Wine on a prefix created by a 64-bit-enabled Wine, you will see that error. So your custom build was 32-bit-only, while the Wine provided by openSuse is 64-bit-enabled, and that's where this bug occurs.
https://bugs.winehq.org/show_bug.cgi?id=38497
Jordyn quietraccoon@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |quietraccoon@gmail.com
https://bugs.winehq.org/show_bug.cgi?id=38497
Bruno Jesus 00cpxxx@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #21 from Bruno Jesus 00cpxxx@gmail.com --- Closing duplicate bugs.