Some fixes for SaXAudio#1453
Merged
Merged
Conversation
Tirlititi
approved these changes
Jul 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
With @julianxhokaxhiu, we find two issues with SaXAudio :
1) Critical issue on AudioVoice::OnBufferEnd
From the debug with VS, i get this crash :
I just discovered that you can load some
.pdbfiles, from specific files used by Microsoft.... likeXAudio2_9.dll! :)It seems that it's not recommended to delete a voice directly using this feature, because XAudio might try to play it at the moment it's being deleted... and then, oops.
So, by moving it to a thread, the process becomes much safer.
2) Trace.TraceInformation is too "chatty"
This was something I had noticed in the older version of SaXAudio that I had proposed... and it seems that @julianxhokaxhiu has encountered the same issue: the "log" generated by
NCalcare extremely frequent/heavy inExpression.csvia theTrace.Informationfunctions.The idea behind TrueOdin is therefore simply to move these logs to
Memoria.Prime.Log.Trace.These functions will be called only if the build was built in
Debugmode.After completing two intensive playthroughs (starting from the beginning of the game and playing at a constant 5x speed, using Echo-S).
=> During my first playthrough, I crashed in the Gargan Roo of Treno (Disc 2).
=> During the second one, I managed to get further... but I had to stop my test due to lack of time :(
In any case, I think these two fixes help stabilize SaXAudio (though crashes are still possible, seems rarely).
If this PR is accepted, we’ll be able to share the
CanaryorPre-Releaseversion with players for testing.