Get Encoding Setting With Code


(Vittle) #1

Hi, FMOD. I am prepare to check audio resource in my Unity project, and have trouble in getting event encoding setting with code. So, which API can I use? Thanks.


(Cameron Baron) #2

It sounds like you might be looking for something like FMOD_SOUND_TYPE.
https://www.fmod.com/docs/api/content/generated/FMOD_SOUND_TYPE.html

Although this is retrieved from a Sound using FMOD::sound::getFormat but not an event, as events are made up of (possibly) many sounds.

You could use callbacks for when each sound in an event is started, FMOD_STUDIO_EVENT_CALLBACK_SOUND_PLAYED, and get the format from that.
https://www.fmod.com/resources/documentation-api?page=content/generated/FMOD_STUDIO_EVENT_CALLBACK.html#/