JulienDX Posted March 19, 2018 Share Posted March 19, 2018 Hello ! (I am a french developer, sorry for my english ^^) I develop a mobile application with cordova and phaser 2. The application contains a lot of audio files (more than 190) and I use the "setDecodedCallback" function after loading the audio files. Unfortunately when I test the application on an iPad, the decoding increases the memory usage to more than 600mb (while the total of my audio files is about 40mb). And sometimes, it makes the application crash. Is it normal for the "setDecodedCallback" function to increase memory usage to this point? What is the best way to load a lot of audio files with phaser for an iOS application? Thank you in advance for your answer! Link to comment Share on other sites More sharing options...
samme Posted March 19, 2018 Share Posted March 19, 2018 I think it's the actual decoding of the audio by the device (and not the callback itself) that uses a lot of memory. Try to load fewer sounds at once, and destroy/remove sounds once you're finished with them. Link to comment Share on other sites More sharing options...
JulienDX Posted March 21, 2018 Author Share Posted March 21, 2018 Hello, thanks for the answer. The problem is that I need all these sounds. These are voices for dialogues and the player must have access to any voices quickly. Link to comment Share on other sites More sharing options...
Recommended Posts