http://bugs.winehq.org/show_bug.cgi?id=28616
--- Comment #3 from GyB gyebro69@gmail.com 2011-10-20 13:40:07 CDT --- (In reply to comment #2)
Created attachment 37022 [details] dsound: Always enumerate the default device first
The problem was PvZ chooses the first device given by DirectSoundEnumerate() as its music output device, instead of using DSDEVID_DefaultPlayback as it probably wants. On MMDevAPI-enabled Windows versions, the first device given to the DSEnumerate() callback is actually the default device. You can swap around the default device on Windows and confirm that by re-running the dsound tests.
Anyways, here's a patch which makes the first device given to the callback be the default one. It fixes this bug for me.
I couldn't apply the patch neither on the current git (wine-1.3.30-293-g7fa15c5) nor on 1.3.30:
patching file dlls/dsound/dsound_main.c patching file dlls/dsound/tests/dsound8.c Hunk #3 succeeded at 943 with fuzz 2 (offset -109 lines). Hunk #4 FAILED at 1135. 1 out of 4 hunks FAILED -- saving rejects to file dlls/dsound/tests/dsound8.c.rej