• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

GameMaker [SOLVED] Sound Import Misc

Neptune

Member
I'm looking for the "laymans" description of what these options govern.
upload_2020-1-30_12-22-52.png
For general case, what is best for a 3min audio?
For general case, what is best for a 1sec audio?

Any info is appreciated :)
 
I'm looking for the "laymans" description of what these options govern.
View attachment 28494
For general case, what is best for a 3min audio?
For general case, what is best for a 1sec audio?

Any info is appreciated :)
From the docs about the Sound editor, I believe that for your 3min audio you would be best doing Compressed - Streamed.
If you have chosen compressed audio, you can then also choose to have your sound streamed from disk too. A streamed sound will be one that is uncompressed and played in real time, streamed from the disc rather than loaded into memory. Streaming is ideal for music as it reduces the one-off overhead of uncompressing the whole file, which may cause a pause in the game, but is not recommended for simple sound effects where the hit on the CPU is much less.
For a short sound effect (your 1 sec audio) I think you might be best with Uncompressed - Not Streamed, but I'm happy for someone else to let me know if I'm wrong on that:
For sound effects (WAV format) you will want them to be uncompressed so that they play quickly and don't require decoding, however for OGG and MP3 you'd generally want one of the other three options available.
 

TheouAegis

Member
Uncompressed not streamed means the entire audio file will be imported as-is. It won't be an mp3, it won't be an ogg, it'll be a huge file the longer the audio. This means it takes up a lot more memory, but it will also be played almost instantly.

Compressed not streamed means it will be compressed like an mp3 or ogg, but when the sound is played it will need to be decompressed and then dumped into memory. I'd expect this to mean a delay the first time the sound is loaded.

Uncompressed streamed means it will be imported as-is, but I expect it won't be dumped into RAM when loaded, so I'd expect playback would be potentially laggy, but less intensive on the RAM.

That leaves compressed streamed, which would mean it's imported as a compressed mp3 or ogg, which thus means it has to be decompressed before use, and then read from the disk. So slower load on the first play, less load on the RAM.

Since songs are long, they would take up a lot of memory. Compressing them saves on disk space. Streaming them saves on RAM use. On the other hand, sound effects are small and take up very little space, so they're often treated as uncompressed unstreamed.

In short, compressed audios will make your game file smaller but may cause lag when the audio is loaded, and streamed files will make your game easier for older computers and computers with lots of background processes running.
 
Top