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

Support all WaveBank versions #320

Merged
merged 1 commit into from
Jul 26, 2023

Conversation

alesliehughes
Copy link
Contributor

In xactengine 2.5, the extra field HeaderVersion was added.

Copy link
Member

@flibitijibibo flibitijibibo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lots of tiny changes, otherwise lgtm

@@ -3105,7 +3107,15 @@ uint32_t FACT_INTERNAL_ParseWaveBank(
#define DOSWAP_64(x) x = FAudio_swap64BE(x)

fileOffset = offset;
READ(&header, sizeof(header))

memset(&header, 0, sizeof(header));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
memset(&header, 0, sizeof(header));
FAudio_zero(&header, sizeof(header));

Comment on lines 3114 to 3116
if (header.dwVersion > FACT_CONTENT_VERSION_2_4)
READ(&header.dwHeaderVersion, sizeof(header.dwHeaderVersion));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (header.dwVersion > FACT_CONTENT_VERSION_2_4)
READ(&header.dwHeaderVersion, sizeof(header.dwHeaderVersion));
if (header.dwVersion > FACT_CONTENT_VERSION_2_4)
{
READ(&header.dwHeaderVersion, sizeof(header.dwHeaderVersion));
}

}
*/
if ( header.dwVersion < FACT_CONTENT_VERSION_2_4 ||
header.dwVersion > FACT_CONTENT_VERSION)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
header.dwVersion > FACT_CONTENT_VERSION)
header.dwVersion > FACT_CONTENT_VERSION )

{
return -2;
}

if (!FACT_INTERNAL_SupportedWBContent(header.dwHeaderVersion))
if ( header.dwVersion > FACT_CONTENT_VERSION_2_4 &&
!FACT_INTERNAL_SupportedWBContent(header.dwHeaderVersion))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
!FACT_INTERNAL_SupportedWBContent(header.dwHeaderVersion))
!FACT_INTERNAL_SupportedWBContent(header.dwHeaderVersion) )

In xactengine 2.5, the extra field HeaderVersion was added.
@flibitijibibo flibitijibibo merged commit f70e337 into FNA-XNA:master Jul 26, 2023
5 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