WWW.GetAudioClip Freeze

Hello,

I’ve been loading some audio music clips from the web using WWW (and in some cases saving in the disk and then reloading again, due to some WWW limitations).

Everything actually works fine, but the problem I have is that when I use the WWW.GetAudioClip function, or even WWW.audioClip, the game freezes for a while. This freeze is mild in the webplayer, but in mobile devices it can really be seen for about 2-3 seconds.

I assume this happens because, well, it is a song of about 2-3 MB and it guess that it must load all of that into memory. But I would like to know if there is a way that I can async load this somehow so the freeze stops.

I could set the streaming parameter to true, but the thing is that I need the sample data to interact with, so that is not possible. I can’t use threads either, because almost all of the Unity API is not thread safe, and it won’t let me use it on threads (throws an error when doing it).

And I cannot use AssestBundles because A) I don’t have Pro version, and B) I get the songs in mp3 or ogg format from an external service…

I know there is no much room to work on, and I am starting to assume there is nothing I can do about it and ill have to let it be that way. But I still write this question to ask if anybody has fund a workaround or if anyone has another solution to this problem?

Thanks a lot.

There was some sort of answer by posting in the forum here:

http://forum.unity3d.com/threads/136028-Help-with-WWW.GetAudioClip-Freeze-please

Looks like there is basically no way to stop this as for now, and there does not seem to be any workaorund for it, just have to live with the freeze I guess…