Android 5.0 super slow SoundPool.load method

Is anyone else experiencing the very slow preloadeffect method? I started investigating the issue and it came down to an android bug in 5.0:

https://code.google.com/p/android-developer-preview/issues/detail?id=1812

The loading screen of my game used to take ~3 sec, it now takes ~25sec! The first 10 sound effects load almost in 1ms or so, but the rest, oh boy, each 100kb file takes about 3 seconds to load!!!

Anyone else?

Did you find any way to work around this?

Looks like it hasn’t been fixed by google on the android side, and I can’t find anything I can do on my (cocos2d-x) side…

Not sure if people are testing on Android 5 yet, but your loading times will be annoyingly long :frowning:
Loading my game on a Nexus 7 2013 with Android 4.4.4 takes 8 seconds, loading it on Android 5 takes 38 seconds!!!

For development you can turn on NUPlayer in the developer options, so you can at least test on normal bootup speeds again, but that doesn’t help anybody out there playing your game…

Kind regards,
Michaël

Not a beautiful solution, but i decided to load the sounds in another thread. This way it doesn’t block the main thread and your game will load fast. However, you have to be very careful NOT to play any sound before all sounds are loaded. So basically the first 38 second in your game, there won’t be any SFX. Let me know if you come up with a better solution!

For me this issue is very relevant. You can describe your method of solution?

The latest android update (on your device) should have enabled the NUPlayer.
With this player enabled, the sounds load fast again.

I think this changed in 5.01 or 5.02…

After upgrading to version 5.01 the problem disappeared.