http://bugs.winehq.org/show_bug.cgi?id=11048
Summary: Grand Prix Legends: Sound (mixing?) makes game stutter (regression) Product: Wine Version: 0.9.52. Platform: PC OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: wine-directx-dsound AssignedTo: wine-bugs@winehq.org ReportedBy: geraldf2@free.fr CC: maarten@codeweavers.com
Hi,
Starting from Wine 0.9.43 up to 0.9.52 (the last I tried), sound (probably mixing because it seems to get worse as more simultaneous sounds are heard) affects game performance very badly, the game/framerate is low and stutters and warps particularly when other cars are nearby (presumably because of their sound), to the point it's unplayable. If selecting no sound output in 'winecfg' the game run smoothly again. From Wine 0.9.43 to 0.9.48 sound is scratchy/irregular, from Wine 0.9.49 to 0.9.52 sound is generally better/ok (except of course during warps where it goes like "juuiiiiii") while the performance problem is even worse. Wine 0.9.42 doesn't have these problems.
I tried with OSS and ALSA, and also some combinations of the other sound settings in winecfg ("Hardware acceleration", "Emulate driver"...), that doesn't help.
There were not these problems with Wine 0.9.42 (which I'm still using to run the game), sound and performance were both good.
(Note that this is not because of the UseGLSL thing enabled by default because I did set HKEY_CURRENT_USER/Software/Wine/Direct3D/UseGLSL = "disabled" using wine's regedit and that doesn't help.)
To reproduce the bug in Grand Prix Legends one should set the "Max # of Sounds" setting in the game to a good amount (ie: 16) as it's on a low value by default, which may make the problem less obvious (particularly if you have a fast CPU I guess), and then start a "Single Race" and set "Computer Opponents" to a good number (ie: 19) because if alone on the track there won't be much different sounds played, then go drive out of the pit lane and the game should stutter badly. Note that the game puts you randomly in the pit lane, so in case you appear in front of the other cars you may want to turn around and drive backward while passing near the other cars.
The problem that may hinder testing tho is that I guess if you have a "too fast" CPU you may not notice the problem (someone with a beefier system than mine told me he didn't have the problem). Personally I have a Duron 1800MHz CPU and the problem is very obvious (it's unplayable), while with Wine 0.9.42 it runs well even with the "Max # of Sounds" game setting set to 16.
Note that this may be related to bug #9589: http://bugs.winehq.org/show_bug.cgi?id=9589 Where I posted comments when I initially had the "Max # of Sounds" game setting set to only 6 which resulted in me not noticing the performance problem in Wines from 0.9.43 to 0.9.48 (I thought it was only bad sound, plus I didn't run these versions much, that's only recently when I set it to "16" that I realised the problem was also in 0.9.43 to 0.9.48). Plus regression testing I redid now for this bug (but now looking for the performance problem) indicates the same patch. I open a new bug here because I still don't know if the other bug report was about the same problem, plus it only reported a bad sound problem (and for another game) while I'm more after the performance problem (plus it seems the bad sound problem may be resolved actually if you forget about the performance problem).
If you want to test with Grand Prix Legends, a fully functional demo (only one racing track) known as "GPL 2004 Demo" should be available at these addresses: http://www.3dgamers.com/dlselect/games/grandprixlegends/Thirdparty/gpl_2004_... http://www.gamershell.com/download_6101.shtml Once unzipped, the installer exe should have this md5sum: 9fc0abf47838a3d501386d58cffda39e gpl_2004_demo.exe
(If you need help running the game feel free to contact me, for a start it requires the "Emulate desktop" option to get keyboard focus and the absolute path of the exe (ie: 'wine C:\path\to\gpl.exe'), and also set 'lastRasterizerDLL = rastOGL.dll' in the game dir file 'app.ini' before launching the game)
I did regression testing between wine-0.9.42 and wine-0.9.43, starting with: git bisect start git bisect good wine-0.9.42 git bisect bad wine-0.9.43 (...)
After the repetitive process the result finally says the following (I scrambled a bit the email address just in case):
---------- 36e90546298e8c096926330dd75f4e373a415171 is first bad commit commit 36e90546298e8c096926330dd75f4e373a415171 Author: Maarten Lankhorst m.b.la nk ho rst at g m a i l. com. Date: Sun Jul 29 23:47:01 2007 +0200
dsound: Move resampling away from mixer thread.
:040000 040000 5ed63dd88502a379f31f113ff1c2ff4827b90757 06adff662282b0e6781432b241da5d25a83a17cb M dlls ----------
Thanks for your attention.