goatcorp / wine-xiv-git

wine builds optimized for FFXIV, based on wine-tkg
19 stars 8 forks source link

Sound doesn't work with Scarlett 18i20 USB sound card and pipewire #17

Open prgreadonly opened 8 months ago

prgreadonly commented 8 months ago

Hello,

I wanted to open an issue here before opening an issue on bugs.winehq.org, but please note that this issue is present on both vanilla wine (8.18) and wine-xiv-git.

I have an external sound card: the Scarlett 18i20 USB Multichannel. My arch linux 64 bit system has pipewire 0.3.83 installed along with pipewire-pulse (to handle pulseaudio connections) and lib32-pipewire / lib32-libpulse

Sound does work through this card generally: the winecfg sound test works (in both vanilla and wine-xiv), as well as other wine applications. However, when running FFXIV through wine (or wine-xiv), there is no sound. I can tell by monitoring pavucontrol (and pipewire-pulse output) that streams are being created on startup because a stream briefly appears, then disappears before any sound is output.

I have multiple sound cards connected to this machine, and every other sound card works except for the Scarlett 18i20 USB Multichannel. The one thing that seems drastically different about the Scarlett than the other cards is the profiles used in pulseaudio/pipewire. The scarlett has the following profiles available:

Multichannel Duplex
Multichannel Input
Pro Audio
Multichannel Output

Whereas my other mutli-channel sound cards have profiles such as:

Analog Stereo Duplex
Analog Stereo Output
Analog Surround 5.1 Ouput
(etc)

I'm not sure if that has anything to do with it, but I figured it was worth mentioning.

I've attached the output of PIPEWIRE_LOG_SYSTEMD=false PIPEWIRE_DEBUG=3 pipewire-pulse while FFXIV is launched from XIVLauncher.CORE using wine-xiv: pipewire-pulse.txt

Is there a way to force wine to use ALSA to mitigate this issue?

Again, I know this may be either an upstream wine issue or pipewire/pulseaudio issue, but I figured I would start here Let me know if there's any more info I can provide. Thanks!

EDIT: I also wanted to add that I have no system (/etc/pipewire) or user-specific (~/.config/pipewire) configuration for pipewire in place

EDIT2: I have since tested this with pulseaudio instead of pipewire-pulse and the behavior is the same: the ffxiv_dx11.exe audio streams are killed right after they appear