Skip to content

Conversation

@giomasce
Copy link
Contributor

I didn't manage to compile FAudio with the win32 backend. I tested this patch with a few games by cherry picking it in Proton and everything seemed to work just as before.

See the commit message for some explanation. Currently Wine has the same behavior independently of whether AUTOCONVERTPCM is set, but on Windows calling Initialize() without AUTOCONVERTPCM will be rejected unless the requested format is similar enough to the mix format. I plan to submit a MR that aligns Wine with Windows, so if you want to preserve the current behavior for FAudio flag AUTOCONVERTPCM should be passed instead.

Right now, on Wine, IsFormatSupported() advertises every
(extensible) format as supported, and correspondingly Initialize()
accepts every (extensible) format. However that behavior is not
what happen on Windows, where both IsFormatSupported() and
Initialize() rejects format the differ from the current mmdevapi
mix format for anything other than the sample format.

This might be rectified at some point in Wine. To maintain the
current behavior in FAudio, we stop querying with
IsFormatSupported() and pass flag AUTOCONVERTPCM to Initialize().
@flibitijibibo flibitijibibo merged commit c6bb4e2 into FNA-XNA:master Oct 28, 2025
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants