Quantcast
Viewing all articles
Browse latest Browse all 2891

Why does this audio file cause this error, and how do I trap it?

This is the error: > Error: Cannot create FMOD::Sound instance for clip "" (FMOD error: Unsupported file or audio format. ) This is the file. It looks like any other WAV file, and plays fine in Windows Media Player. [1]: /storage/temp/183930-drop.zip And this is the code. No exception is raised, just an error message to the console. using (var uwr = UnityWebRequestMultimedia.GetAudioClip(url, atype)) { yield return uwr.SendWebRequest(); if (uwr.result != UnityWebRequest.Result.Success) HandleError(uwr, "clip file"); else try { var clip = DownloadHandlerAudioClip.GetContent(uwr); oncomplete(clip); } catch(Exception ex) { _global.Fail($"url: {url} exception: {ex}"); } } Users can supply WAV files. I need to know which ones won't work, and handle them gracefully.

Viewing all articles
Browse latest Browse all 2891

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>