WWW.GetAudioClip - unsupported file types?
I'm using the following line of code:
Utilities.Globals.audioClip = new WWW("file:///" + audiofile.FullName).GetAudioClip(false, false);
in an attempt to load an audio file from the local filesystem. The file is going to be either .mp3 or .ogg, but is not known at compiletime - it's user-selected from their own file system (audiofile is a FileInfo object). I need to accept both because the goal is to be able to import any osu! beatmap, and those are the filetypes they use.
Unfortunately, when I run it, I get "Streaming of 'mp3' on this platform is not supported". Looking at the documentation seems to confirm this - for whatever reason, the ability to get an AudioClip from a WWW is limited to different formats on different platforms, even though the formats themselves are not platform-limited by any stretch.
Is there any way around this? Some other way to load in audio files that isn't limited like that? (Changelog: Corrected "file://" to "file:///", no change in error.)
Your answer
![](https://koobas.hobune.stream/wayback/20220612071939im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Differentiate movie and audio file on game object 1 Answer
Audio doesnt play in the phone but play on the editor 0 Answers
Download files, not stupid HTML code! 0 Answers
Save and Load Audio from web 0 Answers
Error without text 1 Answer