Set priority for internal file codecs?

Is it possible set priority for FMOD internal codecs (or disable them)?

If I have my own codec and I want that to try a file first of every codec (before internal mp3/ogg etc.) Does setting 0 as priority when loading the plugin accomplishes that? If not, what priority has FMOD’s codecs and how do you give them lower priority?

Registering a codec with a priority of 0 will give it the highest priority. If another codec already has a priority of 0 then your newly registered codec will still have a higher priority, and both codecs will have a higher priority than a codec with a priority of 1.
You cannot change the priority order of FMOD internal codecs, but here is the priority of each codec as of 2.02.06:

  FMOD_SOUND_TYPE_FSB,		 	// 250
  FMOD_SOUND_TYPE_WAV,			// 600
  FMOD_SOUND_TYPE_OGGVORBIS,	// 800
  FMOD_SOUND_TYPE_AIFF,         // 1000
  FMOD_SOUND_TYPE_FLAC,         // 1100
  FMOD_SOUND_TYPE_MOD,		    // 1200
  FMOD_SOUND_TYPE_S3M,		    // 1300
  FMOD_SOUND_TYPE_XM,			// 1400
  FMOD_SOUND_TYPE_IT,		   	// 1500
  FMOD_SOUND_TYPE_MIDI,		   	// 1600
  FMOD_SOUND_TYPE_DLS,         	// 1700
  FMOD_SOUND_TYPE_ASF,         	// 1900
  FMOD_SOUND_TYPE_AUDIOQUEUE,	// 2200
  FMOD_SOUND_TYPE_MEDIACODEC,	// 2250
  FMOD_SOUND_TYPE_MPEG,			// 2400
  FMOD_SOUND_TYPE_PLAYLIST,		// 2450
  FMOD_SOUND_TYPE_RAW,			// 2500
  FMOD_SOUND_TYPE_USER 			// 2600

This seems likesomething that should be documented, I will add a task to include this information in our docs.

Perfect, just what I needed, thanks!

1 Like