Hi
I'm trying to play an audio clip, saved in a subfolder in the documents folder.
In the editor everything works fine.
On the iPad, there's no www.error in the test message, and the url ("file:///var/mobile/Applications/789xxx…xx/Documents/Subfolder/mySound.mp3") seems to be OK.
But audio.clip.isReadyToPlay returns false, and audio.clip.samples shows 0.
var www : WWW = new WWW ("file://"+Application.persistentDataPath + SubfolderWithSlash + fileName + ".mp3");
yield www;
var clipw = www.GetAudioClip (false, false);
yield WaitForSeconds(0.2);
audio.clip = clipw;
audio.PlayDelayed(0.5);
//Message String for debugging
testMessage = www.error + audio.clip.isReadyToPlay + www.url+ audio.clip.samples;
Destroy (gameObject, 2.0);
Thanks
Marco
↧