canno't play sound through AudioSource

hey,
I’m building an app that will run on thinkingpad(Android)
and i’m trying to add a background sound and load the music from disk at runtime.
i think I tried every possible variation of this code…none of them are working. the common thing is the error:

Error: Cannot create FMOD::Sound instance for resource 8EBC, (Unsupported file or audio format. )
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

Error: Cannot create FMOD::Sound instance for resource 8EBC, (Unsupported file or audio format. )
UnityEngine.WWW:GetAudioClip(Boolean, Boolean, AudioType)
c__Iterator2:MoveNext() (at Assets/Scripts/TheScene.cs:282)
UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)

i tried “.WAV”, “.OGG”. extensions. still doesn’t work. i tried from “file://” and with a direct link.
still nothing.
this is my code: (the first one is loading a single file, and the rest is first loading all the clips then i can play the one i want. (doesn’'t work!!!)

    IEnumerator DownloadAndPlay(string url)
    {
        Debug.Log(url);
        _www = new WWW("https://dl7.volafile.org/get/7yUm79kvybxr/BalloonsBG.ogg");
        Debug.Log("Start Dowload");
        yield return _www;
        Debug.Log("Playing");
        _audiopoint = GetComponent<AudioSource>();
        _audiopoint.clip = _www.GetAudioClip(true, true, AudioType.OGGVORBIS);
        _audiopoint.clip.name = "Downloaded clip";
        _audiopoint.Play();
    }


void PlaySound(int i)
    {
        source.clip = clips;
        source.Play();
    }

    void ReloadSounds()
    {
        clips.Clear();
       // StartCoroutine(DownloadAndPlay("file:///" + backgroundSoundPath));
   //   StartCoroutine(LoadFile(team1poppedSoundPath));
   //     StartCoroutine(LoadFile(team2poppedSoundPath));
      //  StartCoroutine(LoadFile(backgroundSoundPath));
    }

    IEnumerator LoadFile(string path)
    {

        string url = string.Format("file://{0}", path);
        WWW www = new WWW(url);
        yield return www;

        AudioClip clip = www.GetAudioClip(true, true, AudioType.OGGVORBIS);


        print("done loading");
        clip.name = Path.GetFileName(path);
        clips.Add(clip);
    }

if u have any clue,
thanks!!

I’m confused about the line source.[clip](http://unity3d.com/support/documentation/ScriptReference/30_search.html?q=clip) = clips; in your PlaySound method. How are you assigning what looks like an array/list of clips to the clip property of an AudioSource? Could you show the declaration of clips?

I doubt that’s your issue, but I’m confused at how this code is even compiling.

Its probably clips [ i ](fuck italics) by the method parameters

yes. it disapeared.

Tell me about it, i wrote the previous comment 3 or 4 times over because it treats with an ‘i’ in the middle as a shorthand for italics for some reason.

One of the many reasons to use code tags when adding code :slight_smile: