Get Assets from Event without playing

Hey,

we’re using Fmod on a Unity project, and looking into the exposed API, I can’t find a way to get Assets used in an Event.

My use case is that I want to load the source Asset file (wav) and generate some metadata myself and store it besides Fmod banks. I want to do this ahead of time to avoid processing it at runtime.

Currently, everything is very locked down, so I didn’t find any way of getting this to work.

Any help is appreciated.

Hi,

Unfortunately, it is not possible to get the original audio asset from an event instance.

However, it is possible to get the sound (FMOD Engine | Core API Reference - Sound) from the FMOD_STUDIO_EVENT_CALLBACK_SOUND_PLAYED callback (FMOD Engine | Studio API Reference - FMOD_STUDIO_EVENT_CALLBACK_TYPE) which will contain information such as the sounds:

And much more, is there any specific meta data you wanted to retrieve from the audio file?

Please let me know if there is anything else I can assist with.

Hey,

thanks for the response.

I want to process the amplitudes to pregenerate some information outside of runtime.

I saw the Fmod studio project contains xml files, linking files together through guids, so the information on which Asset is used in which Event is there, you just don’t expose it.
It would be great, if this data is serialized already, that you would also expose API to retrieve Assets from Event timeline.

For now we took a different approach, but would most likely start analyzing the xml files, unless you decide to add support for Editor metadata about the project.

Thanks

Thank you for the information and the suggestions. I will pass it onto our development team to investigate further.