Fixes a hang when joining a multiplayer game in Burnout Paradise Remastered. The game expects to find a space in the device name and spins forever trying if it can't.
-- v2: winepulse.drv: Change device description to "PulseAudio Device".
From: Paul Gofman pgofman@codeweavers.com
--- dlls/winepulse.drv/pulse.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/dlls/winepulse.drv/pulse.c b/dlls/winepulse.drv/pulse.c index 0ddddb00185..31936ab057d 100644 --- a/dlls/winepulse.drv/pulse.c +++ b/dlls/winepulse.drv/pulse.c @@ -833,8 +833,9 @@ static NTSTATUS pulse_test_connect(void *args) list_init(&g_phys_speakers); list_init(&g_phys_sources);
- pulse_add_device(&g_phys_speakers, NULL, 0, Speakers, 0, "", "PulseAudio"); - pulse_add_device(&g_phys_sources, NULL, 0, Microphone, 0, "", "PulseAudio"); + /* Burnout Paradise Remastered expects device name to have a space. */ + pulse_add_device(&g_phys_speakers, NULL, 0, Speakers, 0, "", "PulseAudio Device"); + pulse_add_device(&g_phys_sources, NULL, 0, Microphone, 0, "", "PulseAudio Device");
o = pa_context_get_sink_info_list(pulse_ctx, &pulse_phys_speakers_cb, NULL); if (o) {
The name is exposed in mmdevapi, also it identifies the device in registry which games also can read. In this specific game I found the name (now "PulseAudio Device") as VOIP input device name when in multiplayer game.
This seems unfortunate to say the least. What about the other pulse devices? What about the other drivers?
Looks like winealsa.drv and wineoss.drv already have spaces in the names it returns (but winepulse is used far more often than any of those). Regarding the actual device names, I guess they are unlikely to miss spaces just the same way as on Windows (that's probably why this game could stay there).
So of course that doesn't make this full proof for any possible config probably, and that looks like an apparent game bug, yet the fix is not complicated as well? Or, maybe, it can actually be a bit of improvement if I state input or output device in the name ("PulseAudio Input")?
I guess I'm persuaded that "PulseAudio Input" and "PulseAudio Output" are better names than what we have (and also happen to have a space ;-), so let's go with out.
I do wonder whether we actually want to keep these two. Now that we enumerate all of the devices, we could probably get rid of them.