[Bug 45502] No sound in Starcraft II

wine-bugs at winehq.org wine-bugs at winehq.org
Mon Jul 23 18:04:02 CDT 2018


https://bugs.winehq.org/show_bug.cgi?id=45502

--- Comment #3 from Maciej Stanczew <maciej.stanczew+b at gmail.com> ---
Additionally, the game crashes on two occasions after this commit: a) when
changing sound device output in the Options menu, and b) when exiting the game.

Cause of the problem seems to be modification of usage of pa_stream_peek():
-            } else {
-                pa_stream_peek(This->stream, (const void**)&src, &src_len);
+            } else if (pa_stream_peek(This->stream, (const void**)&src,
&src_len) && src_len) {

According to PulseAudio documentation [1], this function returns 0 on success,
so the condition here will never be satisfied. Changing the condition to "0 ==
pa_stream_peek(..." fixes the problem.

Also one interesting thing is that other Blizzard games don't seem to go into
this area at all -- I added some logs to pulse_rd_loop and they didn't trigger
in D3 or HotS, only in SC2 (and sound worked in those other games).

[1]
https://freedesktop.org/software/pulseaudio/doxygen/stream_8h.html#ac2838c449cde56e169224d7fe3d00824

-- 
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.



More information about the wine-bugs mailing list