[Bug 43173] Far Cry 4 sound stops

wine-bugs at winehq.org wine-bugs at winehq.org
Thu Mar 7 18:06:15 CST 2019


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

--- Comment #12 from Ethan Lee <flibitijibibo at gmail.com> ---
After playing with this on Windows (FAudio doesn't work there either) I'm now
reasonably convinced that they're using their DirectSound stuff to interact
with XAudio2 in some way. In particular, I think they might be reusing some of
this:

https://blogs.msdn.microsoft.com/chuckw/2012/05/02/xinput-and-xaudio2/

If I'm right (which is admittedly unlikely, this code is for 360 controller
audio support, why would we be getting near that...?), the problem is with
FAudio's XAUDIO2_DEVICE_DETAILS.DeviceID value. From the above post...

> On Windows XP, the deviceID from XAudio2 is a DirectSound GUID, while on Windows Vista and later it is a WASAPI Audio Endpoint Device Identifier.

FAudio is producing neither of these, and in particular, it's not producing
anything that matches Wine's DSound/WASAPI endpoint IDs. So it's possible that
they're comparing device info against the other audio IDs that are already in
use by the engine, then bailing on their own XAudio2 context when the device
info doesn't match.

A quick and dirty way to fix this would be to figure out what Wine is using for
the default endpoint ID, then shove that into FAudio (either hardcoded for via
an environment variable):

https://github.com/FNA-XNA/FAudio/blob/master/src/FAudio_platform_sdl2.c#L209

The long-term solution would most likely be to revisit the WASAPI backend,
which still isn't pretty since FAudio_platform continues to change internally
~once a month.

That's all assuming that my DeviceID guess is right. I really, REALLY hope it
isn't.

-- 
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