- Home /
Help to solve freezes when web client start playing downloaded audioclip
Web build client freezes when start playing a newly downloaded audio clip...
I downloaded music files in OGG format:
WWW www = new WWW(<URL>);
Clip clip = www.GetAudioClip(false);
Then played them:
if (clip.loadState == AudioDataLoadState.Loaded)
{
audioSource.Stop();
audioSource.clip = clip;
audioSource.Play();
}
Everything works, but there is a noticeable client freeze if you have a weak PC, it lasts almost a second when clip plays first time... when I switch to other downloaded clips it freezes again, after first time it switches without freezes....
It's clear that it unpacks or converts audio when playing it first time, but can I change the priority on this to allow the game run smoothly?
Maybe different audio format can solve the problem? ... but in any case, audio file should be compressed, otherwise it will eat a lot of traffic.
Your answer
Follow this Question
Related Questions
WWW.GetAudioClip Freeze 1 Answer
Web player stalls 1 Answer
Webplayer throwing FTP errors as popups 1 Answer
UriFormatException 1 Answer
WWW.Post works fine in Editor, but not in WebPlayer Build 0 Answers