Search Unity

AudioMixerPlayable problems

Discussion in 'Animation' started by mangax, Sep 5, 2019.

  1. mangax

    mangax

    Joined:
    Jul 17, 2013
    Posts:
    336
    hi everyone..

    i have an issue since a long time with AudioMixerPlayable in the new playable system, it's just doesn't work well!

    when playable system was new, audio aspects used to work just fine, but over a year to latest unity version, the audio only heard when i play the first input (only) into the audio mixer.

    i use same approach provided by unity docs + unity moderators posting in this forum..
    connecting playable audio clips to an audio mixer, then from the audio mixer to audio output.. nothing too fancy.
    in playable graph visualiser i can see clips playing.. but nothing heard in the game.

    i tried looking around for similar issue as mine, i came across multiple old posts.. without a solution like :
    https://forum.unity.com/threads/aud...-and-binding-not-working.618196/#post-4140946

    any idea how to fix or find a work around on this??

    thanks
     
    Last edited: Sep 5, 2019
  2. mangax

    mangax

    Joined:
    Jul 17, 2013
    Posts:
    336
  3. jadelion1235

    jadelion1235

    Joined:
    Oct 19, 2017
    Posts:
    3
    I had the same issue, and ended up submitting a bug report for this:
    https://issuetracker.unity3d.com/is...rst-input-when-crossfading-at-least-two-clips
    I had been trying to get this to work just with audio clips, but outside of the older Unity 2017.4 I couldn't seem to get it to work.

    My end goal was to mix audio on different Timelines using AudioMixerPlayable, and found a workaround for that. Each audio track is fed into its own AudioMixerPlayable, and then into a central AudioMixerPlayable before going to the AudioPlayableOutput.
    Mixing mixers seems to work, though I haven't tested it with plain AudioClipPlayables, just Timelines
     
    mangax likes this.
  4. mangax

    mangax

    Joined:
    Jul 17, 2013
    Posts:
    336
    @noelthomas , thanks for the replay & reporting this bug

    i will try to implement this as temporary solution.. i hope it works.
     
  5. 5argon

    5argon

    Joined:
    Jun 10, 2013
    Posts:
    1,555
    lol everytime I try to learn any new things in Unity I ended up debugging a bug for days and thought it was my fault.

    Even though it says fixed in 2019.3, the bug is still present in 2019.3.0b8.


    I just implemented like this (no Timeline, pure scripting) and it doesn't work. Both branches have full weight and only the first one is heard. (If I switch place of `AddInput` call, then I am able to hear the other one)

    upload_2019-10-31_17-48-55.png
     
  6. mangax

    mangax

    Joined:
    Jul 17, 2013
    Posts:
    336
    to be honest i didn't bother finding a fix, because development on playable api has been stopped.. unity devs say there is a new DOTS version for animations which is very similar to playables api.. so it should be easy to upgrade your scripts when the new system is ready..

    currently.. i added in my pool manager a new function to instantiate poolable Audio object, that i can reuse for any kind of sound i want to use at certain location.. it fits 80% of my needs..
     
  7. 5argon

    5argon

    Joined:
    Jun 10, 2013
    Posts:
    1,555
    I had almost the same implementation with AudioSource pool before moving to playable based, because I need to be able to play timeline sequenced audio from script in the mix of regular AudioClip plays and the lowest common functionality to support both is a playable graph..

    DOTS Audio is the same only the aspect that it is graph based. However what flows through the graph is not time unlike playable graph, you are given an output buffer area to do something. It is much lower level.
     
  8. 5argon

    5argon

    Joined:
    Jun 10, 2013
    Posts:
    1,555
    Hey, I have confirmed this is fixed in 2019.3.0b9 that just arrived.
     
    jadelion1235 and mangax like this.
  9. jadelion1235

    jadelion1235

    Joined:
    Oct 19, 2017
    Posts:
    3
    I have just given this a test in 2019.2.12f1 that just released, the bug is fixed in this version as well
     
    5argon likes this.