I’ve read the documentation regarding multi-language support and the Audio Table
.
I now have a question: Playing audio from within the Audio Table
seems somewhat complex. Is the approach in this sample code truly the optimal solution currently? Is there any possibility to simplify it?
Referenced Code: https://www.fmod.com/docs/2.02/unity/examples-programmer-sounds.html
Hi,
Thank you for reaching out!
Yes, the approach shown in the sample code is currently the recommended solution.
The reason the callback is required is because programmer instruments depend on it to dynamically provide audio data at runtime, especially when using Audio Tables for localization purposes.
The callback handles key events such as CREATE_PROGRAMMER_SOUND
and DESTROY_PROGRAMMER_SOUND
. These events allow your code to specify which audio file to load from the Audio Table and ensure that resources are properly released afterward. Without this mechanism, FMOD wouldn’t know which sound to play, and you would encounter errors.
1 Like
Thank you for your response.
After further experimentation and research, I’ve gained a clearer understanding of the purpose of each line of code.
I have another question:
Which file formats does FMODUnity.RuntimeManager.CoreSystem.createSound() support?
This doesn’t seem to be mentioned in the documentation.
I assume it supports all formats listed in FMOD_SOUND_TYPE?
Sorry for the confusion! You can find the list of supported file formats in the following section of the documentation:
FMOD Engine | 4. Core API Loading and Playing Sounds | 4.6 Supported File Formats
Yes, it supports all of the listed formats, but please note that not all of them can be loaded as standalone files. Some are internal formats used within .fsb
(FMOD Sample Bank) files, and others may be platform-specific.
The formats listed in FMOD_SOUND_TYPE represent the types FMOD can identify when loading a sound. However, this enum is primarily used for determining the format after the file is loaded, and should not be taken as a definitive list of formats that can be directly passed to createSound()
.
Hope this helps! Let me know if you have any qeustions.
1 Like
Your response covered exactly what I wanted to know, thank you so much for your professional guidance!
1 Like