Sign In Register

How can we help you today?

Start a new topic

Error downloading file audio - Unity 3D


 public void DownloadAFileAudio()
        new GetDownloadableRequest()
            .Send((response) =>
                GSData scriptData = response.ScriptData;
                shortCodeSong = response.ShortCode;
                var size = response.Size;
                Debug.Log("Dimensione:" + size);
                Debug.Log("Short Code:" + shortCodeSong);
                urlItemSong = response.Url;
                Debug.Log("Short Code:" + urlItemSong);
        //yield return urlItemSong;

    public void StartDownloadAudio(string urlPassed)

    public IEnumerator DownloadAudio(string urlPassed)
        WWW audioLoader = new WWW(urlPassed);
        while (!audioLoader.isDone && audioLoader.progress < 0.1f)
            Debug.Log("Loading progress " + audioLoader.progress);
            yield return new WaitForSeconds(0.5f);

        Debug.Log("Starting playback size " + audioLoader.bytesDownloaded);
        downloadedSong.clip = audioLoader.GetAudioClip(false, true, AudioType.OGGVORBIS);
        downloadedSong.volume = 1;



1 Comment

hello to all, I write to you after trying for several hours to solve this problem, I do not know why but when I download the audio file gives me what you see in the picture. I am also attaching the script

Login to post a comment