I’ve searched the forums for a solution to what I think is an audio issue I’m having on the iPhone. But to no avail. So I’m hoping someone can help me with this annoying problem:
During the course of my game I run a single music track (compressed 3.6 MB) without any issues. I can start, pause, resume and restart the track when required. However, when I load the next level the game crashes at the start of this newly loaded level. When I disable the audio clip from playing (i.e. simply don’t call it whatsoever) then the game never crashes between level loads, so I am assuming this problem is very likely audio or memory related.
In an attempt to remedy this I have changed the audio format from mp3 to m4a, added audio.stop commands before loading the next level and added various yield timings to wait for any memory clean up that may be happening. Nothing seems to work. Also, the audio source is attached to an empty game object with no other components.
Additionally, the level that crashes does not contain any audio - I’m not sure if that is also relevant.
Anyway, if anyone has any suggestions I would be grateful.
- Unity Pro iPhone Pro (1.0.2f4)
- AppStore Games: Ball-X