- Home /
A method for streaming custom audio from the hard drive
With the deprecation of WWW.GetAudioClip, UnityWebRequestMultimedia.GetAudioClip seems to be the main way to download custom audio off the internet and play it at runtime. Which is great and all, but what about loading custom audio off the player's hard drive?
Surely there must be some synchronous method for creating an AudioClip using a file off the hard disc; something that doesn't require messing around with web code and coroutines. Is there some way to--for instance--use File.ReadAllBytes() at runtime and pass the resulting byte array into an AudioClip? (I notice that AudioClip.SetData() expects to receive a float[], which is decidedly not a byte array, and that the AudioClip.LoadAudioData() method seems to...be useless?)
Is UnityWebRequestMultimedia.GetAudioClip() really the only game in town? Or is there something a little less cumbersome available for loading custom audio off the hard drive?
Your answer
Follow this Question
Related Questions
Usage of DownloadHandlerAudioClip.streamAudio 1 Answer
AudioClip "Stream from disc" does not work in standalone apps 0 Answers
How to have www streaming to work with a radio station? 1 Answer
How to split up AudioClip into chunks of 10ms? 1 Answer
How to avoid lag when using WWW class to download sound 3 Answers