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

On sound data storage. #244

Open
TheRamenChef opened this issue Mar 25, 2019 · 1 comment
Open

On sound data storage. #244

TheRamenChef opened this issue Mar 25, 2019 · 1 comment

Comments

@TheRamenChef
Copy link
Collaborator

Sounds loading, even on my 5-year-old computer, are very fast: 5+ minutes of compressed music can be loaded into the game in under 10 seconds. However, the uncompressed sound data is about 10 times the size of the compressed data, which is already more than 2MB. Should we really be storing the uncompressed audio data in the Sound class, or creating an AudioInputStream with the compressed data whenever the sound is needed?

@Gamebuster19901
Copy link
Contributor

Gamebuster19901 commented Feb 3, 2021

I don't know if this has already been implemented, but for any sounds longer than a few seconds that aren't used often, you generally should be streaming the data from the file. This has the added benefit of reducing memory usage and load times.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants