which soundfile type to use in UPBGE?

Hey guys, what (sound) file type would you recomend to use inside the game engine for:

  1. SFX
  2. Background Music
  3. Voice over

Is there any difference if i use a wav, mp3 or ogg? (or even a less known?)
How does the compression affect the overall performance?
Are there codecs that are better for long files, are some codecs better for short files?
Do you know any tricks how to optimize the soundsystem?
Are there any other thoughts on this topic worth mentioning?
I´ve found this handy list of supported codecs here on the forum, but this list does not give an answer which advantages and drawbacks there would be in particular for each type.

Any kind of help is greatly appreciated!

  1. SFX -> WAV
  2. Background Music -> MP3 or OGG
  3. Voice over -> depend, a very large speech mp3/OGG, few words WAV

Is there any difference if i use a wav, mp3 or ogg? (or even a less known?). Mp3/Ogg consumes more processing power and they have to be uncompresses in memory but they have minimum size in disk. WAV has maximum size in disk, consumes less processing power, it hasn’t to be uncompressed and it takes the same size in memory that in disk.

How does the compression affect the overall performance? Yes, Wav better than MP3. MP3 better than OGG. Performance related
Are there codecs that are better for long files, are some codecs better for short files? Maybe
Do you know any tricks how to optimize the soundsystem? You can make some kind of LOD distance based to camera (in this case listener 3D). i.e. Only play sound if Number_sound_playing is less than 3 and distance_to_listener_3d is less than 30 meters.

Are there any other thoughts on this topic worth mentioning?
I think that using MP3 files you have to pay royalties. Ogg/WAV no.

thanks… that was a great piece of advice - especially the royalty thing… didn´t think of that :slight_smile:
One more thing i´ve learned on a different Forum is to turn off the 3D in background music.

mp3’s patents expired a few months ago, so the royalty thing no longer exists.