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

[iOS] Streaming audio with loop

$
0
0
Hello everyone, I'm trying to use the WWW.getAudioClip for streaming music (local or in a webserver). I have my streaming music playing and with the loop option in true, it works on Android. When the song gets the end it's looped right, but in iOS it keeps looping the last frame of music (0.2 seconds). Anyone with this problem? Any idea? In a short brief my code is something like this: audio.clip = m_WWW.GetAudioClip(m_3DAudio, true, m_AudioType); if(audio.clip.isReadyToPlay == true && audio.isPlaying == false) { audio.loop = true; audio.Play(); } As it makes the loop on the last frame of music I changed my function with : audio.clip = m_WWW.GetAudioClip(m_3DAudio, true, m_AudioType); if(audio.clip.isReadyToPlay == true && audio.isPlaying == false) { audio.loop = false; audio.Play(); } And in the update if(audio.isPlaying == false) { audio.Play(); } But Unity seems to don't get the end of the track.

Viewing all articles
Browse latest Browse all 4709

Trending Articles



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