litiengine
litiengine copied to clipboard
On sound data storage.
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?
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.