Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

WebGL: AudioClip.GetData() &SetData()

Discussion in 'Unity 5 Pre-order Beta' started by lami, Feb 18, 2015.

  1. lami

    lami

    Joined:
    Jun 17, 2013
    Posts:
    17
    Hi!

    I want to manipulate the samples of an AudioClip.
    It works fine within the Editor (Platform setting : WebGL) but in the browser all float values of the samples seem to be 0.
    Is AudioClip.GetData() even supposed to work in WebGL?

    Anotherthing:
    If I try to use AudioClip.SetData() in a browser I get the following Errormessage (but just in firefox):
    "Cannot set data on compressed samples. Changing the load type to DecompressOnLoad on the AudioClip will fix this.
    I then checked my Audioclips but all of them are set to DecompressOnLoad.

    Any ideas?

    Regards,
    Stefan