Fix EAX values being wrong on Linux x64 - #314
Merged
Merged
Conversation
Deledrius
approved these changes
Jul 27, 2026
zrax
reviewed
Jul 27, 2026
| typedef struct _EAXREVERBPROPERTIES | ||
| { | ||
| unsigned long ulEnvironment; | ||
| unsigned int ulEnvironment; |
Member
There was a problem hiding this comment.
If these need to be a specific size, we should probably use uint32_t etc. instead.
Member
Author
There was a problem hiding this comment.
That's what I was originally thinking, but it seems like the bulk of libHSPlasma doesn't use stdint types. I'm definitely happy to switch it over if that's what we prefer
Hoikas
requested changes
Jul 27, 2026
Hoikas
left a comment
Member
There was a problem hiding this comment.
The getters and setters also need to be updated in PyHSPlasma to match.
On x64 Windows with MSVC, `long` is 32-bits, but on other x64 systems, `long` is 64-bits. When these values in the EAXPARAMETERS structure are populated, a 32-bit unsigned int is read from the stream and cast to the structure member type. Because these are defined as `long` this means that some values that are intended to be 32-bit signed numbers are getting interpreted as 32-bit unsigned numbers because of expansion to the 64-bit member type.
Member
Author
|
Updated to use stdint types and ensured the Python bindings match the new types. |
Deledrius
approved these changes
Jul 27, 2026
Hoikas
approved these changes
Jul 27, 2026
zrax
approved these changes
Jul 28, 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.
On x64 Windows with MSVC,
longis 32-bits, but on other x64 systems,longis 64-bits. When these values in the EAXPARAMETERS structure are populated, a 32-bit unsigned int is read from the stream and cast to the structure member type. Because these are defined aslongthis means that some values that are intended to be 32-bit signed numbers are getting interpreted as 32-bit unsigned numbers because of expansion to the 64-bit member type.