Hi
I need to load a local ogg audio file (represented as a byte array) and convert it to an audio clip.
I tried to access the file using the ‘WWW’ class but wasn’t able to retrieve it correctly (it was corrupted)
Is that even possible in WebGL ?
I can’t seem to use WWW correctly to load a file that is stored locally on indexed db. The only thing I can think of is finding some kind of algorithm that will transform the byte array to an audio clip
Thanks, I checked it out, but there is no source code there, also the files are not saved in indexed db, you just save them yourself on the hard drive.
What I’m looking for is something like this (2 options):
1.Read a locally saved audio file(ogg format) into a byte array (this works ok)
2.Convert the byte array to some float array that can be used to create an audio clip (no idea how to do this)
--------or------------
1.Read a locally saved audio file using the WWW class (I tried to do this but with no success)
2.Use the ‘GetAudioClip’ method to get the audio clip
I have online/offline project.
I need to download wav/ogg/mp3 file from Application.persistentDataPath on WebGL platform.
I tried www/webrequest.
For example - WWW(“file://” + Application.persistentDataPath + filePath);
But always get error: Failed to load: Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https.