Search Unity

Timeline with Muted Audio Mixer does plays Audio briefly when loading FROM/TO another scene

Discussion in 'Timeline' started by wagenheimer, Feb 11, 2021.

  1. wagenheimer

    wagenheimer

    Joined:
    Jun 1, 2018
    Posts:
    323
    - I have a Master Mixer and a Music Mixer (with the Volume Exposed)
    upload_2021-2-11_14-1-22.png

    - I have a TimeLine
    - This timeline plays an AudioSource
    upload_2021-2-11_13-58-28.png

    - This AudioSource has an output to an AudioMixer called Music and has the Volume Control Exposed
    upload_2021-2-11_13-59-5.png

    - I use the command AudioMixer.SetFloat("Music", -80) to MUTE the current playing Audio (IT WORKS)
         AudioMixer.SetFloat("Music", -80);


    - Then I load another scene... SceneManager.LoadScene("Scene2").
    - Briefly, when loading the next scene, the Muted AUDIO plays again and then returns to mute
    - On Scene 2 if I click to load SCENE 1 again the bug will happen, the Muted AUDIO will play briefly and then muted again.

    I have a very simple attached project where this bug can be tested. Load Scene 1, click MUTE AUDIO and then click Go to Scene 2 (you will hear the audio briefly). Click "Back to Scene 1" and you will hear the audio again. Keep clicking "Go to Scene 2" and "Back to Scene 1" and you will hear the MUTED audio play several times.

    I have a repro project here - https://www.dropbox.com/s/3jm0h88npfjgush/AudioMixer Bug.zip?dl=0

    I already sent a bug report - Case 1314069



    Has anyone gone through something similar and found a solution?
     
    Last edited: Feb 11, 2021
  2. DavidGeoffroy

    DavidGeoffroy

    Unity Technologies

    Joined:
    Sep 9, 2014
    Posts:
    542
    Thank you, this is extremely appreciated.

    I haven't checked your project yet, but here is some information that may be useful in the meantime:

    Timeline treats audio tracks that are not bound to AudioSources differently than tracks bound to audio sources. If you are unloading the AudioSource that the track is bound to, that may be related to the issues you have.

    We should have more info once we get to your bug report.
     
  3. wagenheimer

    wagenheimer

    Joined:
    Jun 1, 2018
    Posts:
    323