Search Unity

audioclip length half

Discussion in 'Audio & Video' started by Sincoyw, Dec 19, 2015.

  1. Sincoyw

    Sincoyw

    Joined:
    Sep 22, 2015
    Posts:
    10
    now i have a mp3 audio load by WWW class, but the length is just half of the real length, test code can be very simple, and it happened on Android, i think this is a Bug
    Code (CSharp):
    1. AudioClip audio = www.audioClip;
    2.                     Debug.Log("audio.channels:" + audio.channels);
    3.                     Debug.Log("audio.length:" + audio.length);
    4.  
    and it can just play half of the audio
     
  2. Sincoyw

    Sincoyw

    Joined:
    Sep 22, 2015
    Posts:
    10
    Code (CSharp):
    1.                     AudioClip audio = www.GetAudioClip(false, true);
    2.                     Debug.Log("audio.length:" + audio.length);
    3.  

    if i use this code, the out put length is half too, but the audio can play full.....


    anyone has some ideas?