https://bugs.winehq.org/show_bug.cgi?id=40581
Bug ID: 40581 Summary: Regression: dsound input recording from microphone lags with 2 seconds delay Product: Wine Version: 1.9.9 Hardware: x86 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: directx-dsound Assignee: wine-bugs@winehq.org Reporter: iive@yahoo.com Distribution: ---
At first the bug was discovered by using steam.exe voice when running the build-in test.
It's is probably easier to reproduce by using Win32 version of `Audacity`. With that program you have immediate visual result and you can pick from 3 different input methods. The default one "MME" and the third one "WASAPI" work without any noticeable lag.
I got lucky when a person with nick debianuser in freenode irc, managed not only to reproduce the issue on his hardware, but also to find a version that is working properly. He even narrow it down to single release: wine-1.7.33 is working and wine-1.7.34 is buggy.
I did a git bisect to further narrow it down and ended up at:
commit d301254e72f018c3e04272115e20ffc70ffcbc12 Author: Andrew Eikum aeikum@codeweavers.com Date: Wed Dec 17 09:28:13 2014 -0600 mmdevapi: More accurately track device position.
Reverting this commit fixes the recording lag, not only in 1.7.34 but also in 1.9.9 .
https://bugs.winehq.org/show_bug.cgi?id=40581
Ivan Kalvachev iive@yahoo.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Regression SHA1| |d301254e72f018c3e04272115e2 | |0ffc70ffcbc12
https://bugs.winehq.org/show_bug.cgi?id=40581
Andrew Eikum aeikum@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |aeikum@codeweavers.com
https://bugs.winehq.org/show_bug.cgi?id=40581
--- Comment #1 from Andrew Eikum aeikum@codeweavers.com --- Thanks for the nice bug report!
Can you give me some more information? What distro are you using? Are you using PulseAudio? What driver is selected in the winecfg Audio tab? What kind of hardware are you using: motherboard built-in audio, USB headset, something else?
I'm not able to reproduce this here. Can you attach a debug log demonstrating the issue in Audacity? You can find instructions for this here https://wiki.winehq.org/Sound under "What to include when filing a bug".
https://bugs.winehq.org/show_bug.cgi?id=40581
--- Comment #2 from Ivan Kalvachev iive@yahoo.com --- My distribution is Slackware and I do not even have Pulse Audio installed. (Slackware-current introduced it just recently, but you can still manage without PA).
So I'm running native alsa. (And I think this includes that standard dmix and dsnoop plugins).
As you could expect the `winecfg` audio driver is "winealsa.drv". Everything else in that tab is set to "System default". I also ran in a clean wineprefix.
The sound card is built-in ac97/hda variant "snd_hda_codec_realtek hdaudioC0D2: autoconfig for ALC888: line_outs=1 (0x14/0x0/0x0/0x0/0x0) type:line"
As for reproducing it with `Audacity.exe` are you sure you changed the default input from "MME" to the "DSound". ?
I'll attach a log a bit later.
https://bugs.winehq.org/show_bug.cgi?id=40581
--- Comment #3 from Ivan Kalvachev iive@yahoo.com --- Created attachment 54508 --> https://bugs.winehq.org/attachment.cgi?id=54508 Debug log of Audacity.exe DirectSound recording.
https://bugs.winehq.org/show_bug.cgi?id=40581
--- Comment #4 from Andrew Eikum aeikum@codeweavers.com --- Not sure what I was doing earlier, but I retested again and was able to reproduce this. Doesn't happen with the ALSA driver when backed by the alsa-pulse plugin, but does occur when using the plain ALSA default device. I'll look into it, thanks for reporting.
https://bugs.winehq.org/show_bug.cgi?id=40581
--- Comment #5 from Andrew Eikum aeikum@codeweavers.com --- Created attachment 54629 --> https://bugs.winehq.org/attachment.cgi?id=54629 dsound: Capture all available data on each period callback
Can you apply this patch on top of latest Wine and see if it helps?
https://bugs.winehq.org/show_bug.cgi?id=40581
--- Comment #6 from Ivan Kalvachev iive@yahoo.com --- I can confirm that the patch fixes the problem.
Tested with wine-1.9.11.
https://bugs.winehq.org/show_bug.cgi?id=40581
--- Comment #7 from Andrew Eikum aeikum@codeweavers.com --- Great, thanks for reporting and testing! I'll give it a little more testing on my end and send it upstream.
https://bugs.winehq.org/show_bug.cgi?id=40581
Andrew Eikum aeikum@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |791dee7884df0b0dcc7cfccfb70 | |d058cdb45a8e3 Status|UNCONFIRMED |RESOLVED Resolution|--- |FIXED
--- Comment #8 from Andrew Eikum aeikum@codeweavers.com --- This is now in Wine and will be in the 1.9.13 release. Please re-open if you still have the problem.
commit 791dee7884df0b0dcc7cfccfb70d058cdb45a8e3 Author: Andrew Eikum aeikum@codeweavers.com Date: Fri Jun 3 14:35:36 2016 -0500
dsound: Capture all available data on each period callback
https://bugs.winehq.org/show_bug.cgi?id=40581
Andrew Eikum aeikum@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1|791dee7884df0b0dcc7cfccfb70 |7300f1b75d048eea00cbc2a5000 |d058cdb45a8e3 |da0fb7d4c4172
--- Comment #9 from Andrew Eikum aeikum@codeweavers.com --- Wrong commit ID, it's actually 7300f1b75d048eea00cbc2a5000da0fb7d4c4172.
https://bugs.winehq.org/show_bug.cgi?id=40581
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #10 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 1.9.13.
https://bugs.winehq.org/show_bug.cgi?id=40581
Michael Stefaniuc mstefani@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |mstefani@redhat.com Target Milestone|--- |1.8.x
https://bugs.winehq.org/show_bug.cgi?id=40581
Michael Stefaniuc mstefani@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|1.8.x |---
--- Comment #11 from Michael Stefaniuc mstefani@redhat.com --- Removing 1.8.x milestone from bugs included in 1.8.4.