Hello,
I’m on the way to finalize my first unity game for Android platform, but I’m facing a strange issue. I’ve added a music to the main camera (mp3 file) and I’ve got an incredible loss of FPS when playing the game on my android device. This FPS reduction is not visible when running the game on my computer. Is there any trick for using music files on Android devices?
Thanks for your help
Is it wav, mp3 compressed, filesize, etc etc?
This is a mp3 file of 5.87Mo @210kbps
I’ve selected “Decompress on load” in the inspector and compression level is set ti 156 kbps in the inspector
Shall I compress it more?
Do you know how to convert it to a WAV file? Then it’s in a native format and doesn’t have to be decompressed or anything, I would give that a try.
OK, thanks, I’ll try with a pure uncompressed WAV
It works much more better, but now, the APK file size is huge!!! Is this the only way for getting better perfomances?
How big is your WAV file? What’s the time length of the sound?
I use wav files for my sound effects, but I make them mono, so that halves the size immediately.
I guess also what Android device are you testing on?
The WAV file is a music, so the length is about 3 minutes and the file size is 80Mo… I’m testing the game on a Archos 53 Platinum… Maybe a solution would be to down sample the file… I’m a bit estosnished because I was previously developing android game with JMonkey Engine and I did not get such a performance drop while playing mp3 file as background music in the game
I have mp3 background sound and never noticed an issue… Did you try all the different mp3 settings (like not decompressing, etc)?
I think that what I will look for because I cannot survive wich such a file size… I’ll post the result of my investigations as soon as I find a solution
Thanks for your support
Having the bitrate set to 128kbps is much more better! Maybe the original file was corrupted.