It seems audio doesn’t play on WebGL when loaded from an externally hosted assetbundle. "Error: Cannot create FMOD::Sound instance for clip "audioName" (FMOD error: Unsupported file or audio format. )"
There are some old forum posts with this issue from pre-addressable, but none contain solutions that work today.
Update - this is true both in Editor on 2020.1, and in both Editor and WebGL builds on 2020.2.0a
Notably, the load state of the clip after loading it via addressables is AudioDataLoadState.Unloaded, and trying to fix that with audioPlayer.clip.LoadAudioData causes the same error.
Hi, I am getting the same error in Webgl build, but I am not using asset bundle, I am just accessing a link that contains a sound file. The error is the same -
“Error: Cannot create FMOD::Sound instance for clip “audioName” (FMOD error: Unsupported file or audio format. )”. Is this a bug in Unity or am I doing something wrong?
@unity_waiIJd6fbNxk4Q I believe .ogg isn’t supported for WebGL builds because the format is not universally supported across browsers. Can you try loading the files as .mp3?
Hi @Reshad I just double checked with the WebGL team, and the WebGL platform utilizes the built-in audio support codecs available in web browsers. The different types of audio that are supported can be found here
@inkletom I was able to reproduce the “FMOD error: Unsupported file or audio format.” errors when loading audio files from WebGL AssetBundles in the Editor. But in the Player, the audio files load perfectly fine. I’ve created a ticket to investigate the issue.
Here’s the versions I used:
Addressables 1.18.16, 1.19.6
Unity 2020.3.15f2
I couldn’t reproduce the “Failed getting load state of FSB” error, but I suspect whatever is causing the different behavior in the Editor vs the Player is related.
We are now seeing "Loading FSB failed for audio clip ____ " in Safari 15. This appears to be limited to Safari 15 on macOS 10.15.x, but is encountered for Unity versions from 2020.3 back to 2018.x. And for audio clips which are in the build & those loaded from www/xhr at runtime. All of our audio files are mp3
@pillakirsten Hello! I’m seeing this exact issue and could not find the ticket you were referring to in the Issue Tracker (if that is the right place to look). Could you please let me know if this was resolved?
@jinjerie Hmm it’s an internal ticket that’s been closed as not reproducible “Unable to repro with latest addressables, even in the case the user mentioned on mac with Safari. Was able to see AAC audio files indeed cannot be loaded directly”.
If you’re still able to reproduce the issue on a newer version, please send us a bug report