Quantcast
Channel: Questions in topic: "ios"
Viewing all articles
Browse latest Browse all 4709

iOS playing audio from Documents folder

$
0
0
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

Viewing all articles
Browse latest Browse all 4709

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>