I am trying to play a 5-minute audio clip in the background. Here are my audio clip import settings: ![alt text][1]
But when I build the game for webgl, the audio does not stream and after a few seconds it starts playing. So I made a script that checks if the audio clip is loaded then it sets the time scale to 1. But another problem is that the audio seems to be decompressed in the ram memory because the ram usage is a lot higher after the audio clip has loaded. Which indicates that it is not streaming from disk, but it should. Also the profiler does not detect any big memory usage from the audio(a few kb). My game is very small and 2D. The profiler detects max memory usage about 300MB. But firefox/chrome use over 1.5GB. I've set the optimization level to fastest, disabled the exceptions and enabled code stripping. When I build the game for PC, I don't have this issue and it uses about 150MB ram. I really have no idea what to do. I will greatly appreciate any help!
[1]: /storage/temp/52474-settings.png
↧