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

Don't access sgSFX if sound is not initialized #6830

Merged
merged 1 commit into from
Nov 24, 2023

Conversation

StephenCWills
Copy link
Member

Fixes a crash in timedemo when running the test on an MSVC Debug build. Now that the sgSFX collection gets populated by a TSV file, it is not guaranteed to be populated and will in fact remain empty when running timedemo headless. I added some guards to prevent OOB access in two of the affected functions, but I find it's unclear what to do about GetSFXLength(). It makes me wonder if we should go ahead and load the TSV so we can have the option of testing towner dialogs with timedemo recordings.

Copy link
Member

@AJenbo AJenbo left a comment

Choose a reason for hiding this comment

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

I think we just return a hard coded time in that case or was that changed?

@AJenbo AJenbo merged commit ef30ea1 into diasurgical:master Nov 24, 2023
22 of 23 checks passed
@StephenCWills StephenCWills deleted the sfx-headless branch November 24, 2023 15:41
@StephenCWills
Copy link
Member Author

We use a fixed value for FPS, but it's still multiplied by the length of the audio so different speeches would have different lengths. What has changed is we can no longer determine the length of the audio, but only in headless mode.

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