Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[F3DAudio] Bulletstorm: Full Clip Edition #26

Closed
pingubot opened this issue Aug 23, 2018 · 17 comments
Closed

[F3DAudio] Bulletstorm: Full Clip Edition #26

pingubot opened this issue Aug 23, 2018 · 17 comments

Comments

@pingubot
Copy link

pingubot commented Aug 23, 2018

Hi,

first of all thank you very much for bringing in a replacement for xact.
I wanted to give it a try with Bulletstomr Full Clip Edition, as this game is having bad sound issue with the current wine builtin dll's and also using the native ones with wine does not work.

Using the mingw compiled Faudio dlls, i can get into the menu of the game and the sound is fine, i can lower/raise the different sound levels (music, environement and voices) in the sound menu of the game.

Trying to get into a mission i get the following error message:

Assertion failure at F3DAudioCheckCalculateParams (src/F3DAudio.c:342), triggered 1 time:
'pDSPSettings->DstChannelCount == ChannelCount && "Invalid channel count, DSP settings and speaker configuration must agree"'

After being able to klick on ignore, the following error message shows up:

Assertion failure at F3DAudioCalculate (src/F3DAudio.c:1502), triggered 1 time:
'0 && "REVERB not implemented!"'

I can also press ignore here, but the game finally crashes after ignoring both issues 2 times

Many thanks !
Christian

@pingubot pingubot changed the title Bulletstorm full clip edition complains about "Invalid channel count" Wine native dll's: Bulletstorm full clip edition complains about "Invalid channel count" Aug 23, 2018
@pingubot pingubot changed the title Wine native dll's: Bulletstorm full clip edition complains about "Invalid channel count" Wine native faudio dll's: Bulletstorm full clip edition complains about "Invalid channel count" Aug 23, 2018
@pingubot pingubot changed the title Wine native faudio dll's: Bulletstorm full clip edition complains about "Invalid channel count" Wine native faudio dll's: Bulletstorm full clip edition complains about "Invalid channel count" and not implemented "REVERB" Aug 23, 2018
@flibitijibibo
Copy link
Member

Compiling with -O3 instead of -g should suppress the assertions, but maybe look into the Src/Dst mismatch first. Because the data doesn’t match there’s more than likely too much or too little data being written. You can enable tracing in cpp/trace.h and get a verbose call stream dumped too, which should narrow down where it dies.

Unless you have a Visual Studio setup, get ready to do a lot of printf debugging. I don’t have a budget for any real Proton work since I’m not actively on their team, and I don’t own this game myself...

@pingubot
Copy link
Author

Hi,

many thanks for the update. Sadly i have no c/c++ knowledge, so my debugging skills are basically non existent here :(.

Sad that you are not part of the proton team, having working sound is s important as having working graphics, and when it comes to xaudio, wine is not trouble free .

As you are working together with the wine guys, would it make sense to ask them for help cause this issue may show up when faudio eventually will be used in wine per default ?
Suppressing will not stop the game from crashing i guess ?
Is it possible that the error is relate to the amount of sound channels which the game tries to use ?

Many thanks !
Christian

@flibitijibibo
Copy link
Member

Andrew Eikum is working to integrate this into upstream Wine but a lot of that work is just basic correctness fixes (input validation, version compatibility, things like that). Between Codeweavers' work on Wine and Valve's work on Proton I'm just a no-name loser that happens to be in the middle!

The crash will happen without the asserts, but the asserts told us a couple things that we and the game were doing badly, so if anyone can debug this they have a starting point to work with. Based on my experience with XAudio2 Source/Destination channel validation, they may just have 3D math hardcoded to specific values and certain wav files don't line up, but I feel like that'd introduce bugs even in native XAudio2... I'd have to see for myself.

@flibitijibibo flibitijibibo changed the title Wine native faudio dll's: Bulletstorm full clip edition complains about "Invalid channel count" and not implemented "REVERB" [F3DAudio] Bulletstorm: Full Clip Edition Aug 23, 2018
@pingubot
Copy link
Author

pingubot commented Sep 8, 2018

fwiw,i just retested with latest master and still get the same error messages show up. Pressing "Ignore all" let the game run,but without sound.

@flibitijibibo
Copy link
Member

F3DAudio hasn’t been touched in a while, but hey, no more crashes I guess. This at least means the FAudio side should be valid, but maybe a temp solution would be to just ignore the math altogether and just force the output matrix values to be all 1.0f.

@pingubot
Copy link
Author

pingubot commented Sep 8, 2018

Sadly i have no clue where to do that. If you have some patch to do that i will happily apply it here and build and test it and report back.

@flibitijibibo
Copy link
Member

flibitijibibo commented Sep 8, 2018

Might be a while before I can look at this, but if anyone else wants to try, it's this block here:

https://github.com/FNA-XNA/FAudio/blob/master/src/F3DAudio.c#L1433

Instead of attempting to calculate the matrix, just take pDSPSettings->pMatrixCoefficients (which should be SrcChannelCount * DstChannelCount number of floats) and set them all to 1.0f. Or maybe something less than that... who knows how loud that's going to be.

@flibitijibibo
Copy link
Member

It's been a while since this last got updated, so I wanted to check something real quick:

Does this work okay if you only use the XAudio2_7 override and skip our fake X3DAudio DLLs altogether? In testing other UE3 games the combination of the fake XAudio2 DLL with the real X3DAudio (and XAPOFX) libraries seems to work just fine.

@flibitijibibo
Copy link
Member

Based on other UE3 games I've tested, this probably fixes it for now:

ce60c41

@pingubot
Copy link
Author

pingubot commented Oct 5, 2018

Hi,

would have tested that stuff at the weekend, will try it out now with your latest build.
So what do i have to do, do i need to place all dlls in the game folder or just the Xaudio2_7 one ?
And what do you mean with the "real x3daudio and xapofx" ? Are you talking about the original native ones or the wine built in ones ?

Many thanks !
Christian

@flibitijibibo
Copy link
Member

The process is a little more streamlined now, with a fresh prefix these directions should work:

https://github.com/FNA-XNA/FAudio/blob/master/cpp/README.md#prerequisites

https://github.com/FNA-XNA/FAudio/blob/master/cpp/README.md#wine---native-dlls

@pingubot
Copy link
Author

pingubot commented Oct 5, 2018

I don't have a fresh prefix and therefore used application specifc overrides in winecfg for the dlls (native, builtin).

I sadly still have no sound and still the following 👍

Assertion failure at F3DAudioCheckCalculateParams (src/F3DAudio.c:342), triggered 5 times:
'pDSPSettings->DstChannelCount == ChannelCount && "Invalid channel count, DSP settings and speaker configuration must agree"'

WARN:

Assertion failure at F3DAudioCalculate (src/F3DAudio.c:1502), triggered 5 times:
'0 && "REVERB not implemented!"'

Did i miss something?

In addition, i think the wine --native-dlls docu is a little bit misleading here, Afaik, the wine delivered dlls are called builtin, not native (if that is what you wanted to describe).

@flibitijibibo
Copy link
Member

Delete your Bulletstorm Wine prefix and start over, you have outdated DLLs in there.

We don’t have builtins, that’s eventually going to be done in the Wine source tree.

@pingubot
Copy link
Author

pingubot commented Oct 5, 2018

did that, new prefix, used :

build_win64> ../scripts/wine_setup_native 
xaudio2_0: done
xaudio2_1: done
xaudio2_2: done
xaudio2_3: done
xaudio2_4: done
xaudio2_5: done
xaudio2_6: done
xaudio2_7: done
xaudio2_8: done
xaudio2_9: done
Skipping link for x3daudio1_3
Skipping link for x3daudio1_4
Skipping link for x3daudio1_5
Skipping link for x3daudio1_6
Skipping link for x3daudio1_7
xactengine3_0: done
xactengine3_1: done
xactengine3_2: done
xactengine3_3: done
xactengine3_4: done
xactengine3_5: done
xactengine3_6: done
xactengine3_7: done
Skipping link for xapofx1_0
Skipping link for xapofx1_1
Skipping link for xapofx1_2
Skipping link for xapofx1_3
Skipping link for xapofx1_4
Skipping link for xapofx1_5

The error messages are gone, but i still have working sound in the menu, but none when resuming my campaign. If i start a new game, the sound seems to work.

In addition I don't fully understand why you create overrides for dlls which you don't link actually ?

@flibitijibibo
Copy link
Member

The silence is more than likely a sound that either goes through something other than xaudio or is a WMA buffer, which we don’t support.

The overrides are for the DX redist versions, Steam installs them but does not set any overrides, meaning it uses the builtins which are still unimplemented.

@pingubot
Copy link
Author

pingubot commented Oct 5, 2018 via email

@pingubot
Copy link
Author

pingubot commented Dec 2, 2018

Hi,

as an update, i tried to get it working with an faudio build which supports wma from here:

https://gitlab.com/GloriousEggroll/warframe-linux/tree/master/FAudio

But sound when loading the campaign is still a no go.

Many thanks!
Christian

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

No branches or pull requests

2 participants