Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

AudioSource.GetSpectrumData not working in WebGL

Discussion in 'Web' started by Simon_says, May 20, 2015.

  1. Simon_says

    Simon_says

    Joined:
    Oct 19, 2013
    Posts:
    141
    I'm using GetSpectrumData to visualize my audio and it works fine but not on a WebGL build. It works fine in editor though while switched on WebGL platform, but not in web browser. Is this a bug or an intended behavior as it didn't get implemented yet?

    Are there any workarounds for this?

    http://docs.unity3d.com/ScriptReference/AudioSource.GetSpectrumData.html
     
    Last edited: May 21, 2015
  2. mahkal101

    mahkal101

    Joined:
    May 24, 2018
    Posts:
    1
    Did you ever find a solution?
     
  3. Printer_Not_Found

    Printer_Not_Found

    Joined:
    Nov 30, 2020
    Posts:
    2
    Did either of you guys ever find a solution?
     
  4. kennygeeee

    kennygeeee

    Joined:
    Apr 3, 2018
    Posts:
    5
    I had the same issue. For some reason using the GetData method on the audioClip works when built so I just tried to work with that.

    _audioSource.clip.GetData(_samples, _audioSource.timeSamples);
     
    dhtpdud528 and Develax like this.