Streaming local sound files on iOS (62507)

Hi,

My application/project will include sounds tracks, I would like to avoid to pre-load them into memory when the application starts. How can I ‘streaming’ them from a resources folder (StreamAssets folder ?) when I need them?

I was not able to find clear answers. Well I found that thread - http://forum.unity3d.com/threads/356...g-audio-player - but the link is broken and the thread is kinda old.

Any help is appreciated.

Thanks.

(not sure where the best place was I asked the same question on the forum - http://forum.unity3d.com/threads/169236-streaming-local-sound-files-on-iOS)

I have been able to make it work with WWW request

Here is my method:

    private IEnumerator loadAndPlayAudioClip() {
        string path = "file://"+Application.dataPath + "/Raw/Audio/";
        string fileName = "street-voices.wav";

        // Start a download of the given URL
        WWW request = new WWW(path + fileName);

        // Wait for download to complete
        yield return request;

        // use request.audio        
        AudioClip audioTrack = request.GetAudioClip(false, true);
        audio.clip = audioTrack;
        audio.Play();
    }