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

Pre-play audio on first load #376

Merged
merged 1 commit into from
Aug 31, 2022
Merged

Pre-play audio on first load #376

merged 1 commit into from
Aug 31, 2022

Conversation

jspjutNV
Copy link
Contributor

This PR makes audio play when first loaded to avoid stuttering when it first needs to play.

When finished, closes #375

With some luck may also help #275 , but it doesn't fix that yet.

@jspjutNV jspjutNV added the bug Something isn't working label May 27, 2022
@jspjutNV jspjutNV requested a review from bboudaoud-nv May 27, 2022 13:42
@jspjutNV jspjutNV self-assigned this May 27, 2022
@jspjutNV
Copy link
Contributor Author

After 4622f42 #275 still isn't fixed and the click and hold test still fails. We might need to push the audio loads and plays earlier, which will require a bit more work.

@jspjutNV jspjutNV marked this pull request as draft May 27, 2022 13:45
@jspjutNV jspjutNV marked this pull request as ready for review August 31, 2022 11:51
@jspjutNV
Copy link
Contributor Author

Even though #275 isn't fixed, I still believe this is a good perf win. @bboudaoud-nv , if you could take a look and see if you agree or disagree we could potentially merge this soon.

Copy link
Collaborator

@bboudaoud-nv bboudaoud-nv left a comment

Choose a reason for hiding this comment

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

This fix is as good as any for the current model of loading sounds in FPSci. However adding sounds to the soundTable in the set[X]Sound() methods for the Targets is weird. In the future we probably want to build up soundTable at config load and just preplay all audio directly from here. This is a fine fix for now.

@bboudaoud-nv bboudaoud-nv merged commit 5f60623 into master Aug 31, 2022
@bboudaoud-nv bboudaoud-nv deleted the PreplayAudio branch August 31, 2022 17:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Performance hitch early in runtime
2 participants