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

Loading .wav on iOS with WWW

$
0
0
I am trying to load a .wav using the WWW class. This works fine on Windows (PC) and Android. But on my iPhone 4 the app freezes when calling the method below (it stays in the while loop). Does someone have an idea about what is going wrong? private Track LoadTrack(string pathname) { WWW audioToLoadPath = new WWW("file://" + pathname); while (!audioToLoadPath.isDone) { //Wait untill it's done } Track loadedAudio = Instantiate(TrackInstantiator) as Track; loadedAudio.GetAudioSource().clip = audioToLoadPath.GetAudioClip(true, false); return loadedAudio; } The pathname i am passing is retrieved by something like this (simplified exampe): DirectoryInfo info = new DirectoryInfo(Application.persistentDataPath); string pathname = persistentInfo.GetDirectories ()[0].FullName;

Viewing all articles
Browse latest Browse all 4709

Trending Articles



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