[SDL] Using MP3 as sound fx...
prefect_ at gmx.net
Thu Apr 17 12:55:00 PDT 2003
-----BEGIN PGP SIGNED MESSAGE-----
On Thursday 17 April 2003 21:46, Jon Shiring wrote:
> It's quite possible, but you probably don't want to use mp3 for sound
> effects in any sort of game. If you have 12 sounds playing, you're
> going to be adding the cpu overhead of doing an mp3 decode 12 times over
> to your already high cpu usage. The penalty for using wav files is
> really only disk space and possibly the higher file IO (although if your
> sound effects are short, you're not going to be saving a huge amount by
> loading an mp3 as opposed to a wav file).
Since you'd usually want to cache sound effects in memory anyway, you could
load and decode the mp3/ogg when the game is started or a level is loaded.
CPU usage is hardly an issue in this case, and it does reduce the overall
size the game uses on the hard disk, and, more importantly, download sizes.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
-----END PGP SIGNATURE-----
More information about the SDL