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

Audio Mixer - Exposing VU levels?

Discussion in 'Unity 5 Pre-order Beta' started by alex_twotails, Oct 30, 2014.

  1. alex_twotails

    alex_twotails

    Joined:
    Oct 30, 2014
    Posts:
    3
    Hallo!

    I'm loving the new audio mixer, but am having trouble getting the actual live levels from the audio mixer groups. None of the exposable parameters on the effects seem to cover this and I need to be able to access the levels from a script. Can anyone help?

    Alex
     
  2. davem250

    davem250

    Joined:
    May 28, 2013
    Posts:
    186
    Hi, do you mean that you need to make code reference to the audiomixer or is it you need to use the same audiomixer in every level???
     
  3. alex_twotails

    alex_twotails

    Joined:
    Oct 30, 2014
    Posts:
    3
    I mean I need the volume on a specific mixer channel i.e. the VU level represented by the green bars visible on the Attenuation effect. I can expose the volume parameter on attenuation but that doesn't represent the live gain.

    Alex
     
  4. Matthew-Schell

    Matthew-Schell

    Joined:
    Oct 1, 2014
    Posts:
    238
    Have you looked at exposing the volume parameter of the attenuation effect on the group you're trying to work with to scripting and calling GetFloat on it? I believe this will do what you are looking to do. Look in the Scripting API at Audio.AudioMixer.GetFloat for more info.
     
  5. Matthew-Schell

    Matthew-Schell

    Joined:
    Oct 1, 2014
    Posts:
    238
    Just re-read this and talked to one of our engineers, aside from reading the exposed parameter value you can not actually meter the current live gain of a group via script in this release. It's something that the audio guys are working on and hope to include in a future update, but as of now there's no timeline for that.
     
    JoaquimR and Marald like this.
  6. alex_twotails

    alex_twotails

    Joined:
    Oct 30, 2014
    Posts:
    3
    Okay, thanks for getting back to me. Will just cross my fingers and wait.

    Alex