Search Unity

Bug Audio Source: Get Output Data (etc.) doesn't populate list

Discussion in 'Visual Scripting' started by camcnelson, May 30, 2023.

  1. camcnelson

    camcnelson

    Joined:
    May 6, 2018
    Posts:
    1
    I have a scene with an Audio Source and an Audio Listener Component. I am trying to retrieve the real-time audio sample data that's playing in-game within a Visual Scripting graph. However, nodes like Get Output Data and Get Spectrum Data or Audio Clip: Get Data don't behave as expected. Specifically, no data is changed in the lists passed to them. I have ensured they are AOT lists of floats with length equal to a power of 2, and I've tried variables in different scopes, like graph and app. No errors are thrown that I can see in the console. The build target is WebGL, if that is relevant. I'm using Unity Editor 2022.2.3.f1. A friend confirmed this behavior on a different computer with the same editor version.

    The screenshot below shows that the sample offset is working, but list items remain 0 or whatever value they were initialized to.

    upload_2023-5-30_3-46-58.png

    This is my first post on this forum so please let me know if I can provide any other clarifying information. Thank you!