Just checking if I understand this correctly, the Unity iPhone can only play PCM, and playing a web audio stream has to be Ogg. Which means there’s no way to play web audio on an iPhone?
Just a quick follow up question, trying an AIFF in the Unity project seems to prevent the app from opening (the Unity logo stays for a little while before returning to the iPhone menu). This is the case whether the sound is set to play on Awake or on Start. I’ve tried setting it going onMouseDown, but can’t even get that working in Unity iPhone.
So is it possible to play sound at all on the iPhone?
Unity iPhone supports MP3/M4A (ACC compressed) compressed files. Ogg compression is not supported on the iPhone.
If you experience any crashes (as you described in your post), please submit your project via bug report app (which is located just next to the Unity iPhone app)
I feel sure that you must be right, but a search for MP3 in the docs show up nothing, and when I try a build I get an error saying “Error building Player: Couldn’t build player because of unsupported data on target platform”. Selecting None for the sound, or an AIFF for the sound, lets the build take place ok.
If it did work, would it be possible to do this?:
var clip : AudioClip = download.mp3;
I made some progress, it seems that the 400 second song I was using was too much for my 8GB iPhone. Cutting that down a lot made it work, for a few seconds anyway.
Being able to play streamed MP3 would be the best solution.