Search Unity

Timeline Audio out of sync on a Build

Discussion in 'Timeline' started by Revelation_Jeff, Feb 23, 2019.

  1. Revelation_Jeff

    Revelation_Jeff

    Joined:
    Jul 17, 2012
    Posts:
    135
    Hi,

    I'm having an audio problem. I've setup the audio to work perfectly within play mode of Unity editor. I've got a master audio track pre-done in pro tools which is setup from an initial clap track marker at frame 0 on timeline. So in editor everything works perfectly. However upon creating a build the audio becomes desync'd and is slightly off from the video.

    I'm using Game time. I've tried using other settings which either broke the game or didn't help. I'm using 2017.4.1f1 for reference. Am I missing something here? Any suggestions to correct this?

    Thanks so much for any help!

    Jeff
     
  2. seant_unity

    seant_unity

    Unity Technologies

    Joined:
    Aug 25, 2015
    Posts:
    916
    If you need perfect audio sync, use DSP Time on the playable director. Audio is always scheduled and driven against the DSP clock, and DSP time will drive the timeline time by the DSP clock (as close as possible).
     
  3. Revelation_Jeff

    Revelation_Jeff

    Joined:
    Jul 17, 2012
    Posts:
    135
    Hi DSP for me is broke. In testing in editor it breaks sync in play mode and the audio is delayed half a second or more by default, even though my audio is sync'd to a clap track at frame 0 so I can't adjust it any further. It should be exact.

    Secondly when using DSP setting on a build it totally breaks and no sequence plays at all. It just defaults to a random camera view with no motions or events triggering or playing. DSP in a build is completely broken unless I'm missing some other setting that must go along with it?
     
  4. LargoSama

    LargoSama

    Joined:
    Jul 31, 2015
    Posts:
    10
    Hey @Revelation_Jeff , did you figure out a way to have DSP work in builds? It breaks on my end as well and I can't seem to get it working.
     
  5. Revelation_Jeff

    Revelation_Jeff

    Joined:
    Jul 17, 2012
    Posts:
    135
    Nope. Sadly Unity support abandoned me here lol. The only option may be using game time and then making an execution script which holds your cutscene until completely loaded?
     
  6. seant_unity

    seant_unity

    Unity Technologies

    Joined:
    Aug 25, 2015
    Posts:
    916
    @Revelation_Jeff My apologies - I missed your reply. Wasn't intentionally abandoning you!

    If you haven't file'd a bug, I encourage you to do so. Which version of Unity and which platforms are you seeing this behaviour?
     
    Revelation_Jeff likes this.
  7. Revelation_Jeff

    Revelation_Jeff

    Joined:
    Jul 17, 2012
    Posts:
    135
    @seant_unity Hi thanks for getting back to me! =) I've been encountering the issue with Unity 2017.4.1 on a Windows Build. I can try filing a bug report as well.
     
  8. seant_unity

    seant_unity

    Unity Technologies

    Joined:
    Aug 25, 2015
    Posts:
    916
    Filing a bug would be best. There have been many fixes between 2017.4 and now, and I can't recall if that issue has been addressed. Our QA will being able to determine that.
     
  9. hasandogu

    hasandogu

    Joined:
    May 31, 2016
    Posts:
    1
    For the record, I am seeing the same thing happen in 2018.4 and 2019.1 as well.

    I am loading a second scene and call Play on the PlayableDirector that is at the root of this scene. The director is using DSP clock update mode. Once scene is loaded, I call Play but it plays the first frame and waits for a few minutes before continuing with the rest.

    If I unload then reload the same scene again, there isn't a delay and it plays fine this time.

    This doesn't happen when I use gametime update mode on the PlayableDirector.

    If I check the "play on awake" checkbox and load just this scene (as the first scene in the build), it plays fine.

    Does anyone have an idea why it might be the case?

    Have been trying a few different things to see to see why the timeline would wait to play the rest without any luck.
     
    mr_blahblah likes this.
  10. mr_blahblah

    mr_blahblah

    Joined:
    Jan 15, 2016
    Posts:
    25
    Having the same issue with 2018.4 and 2019.1.9f1. How long until there's basic audio support in timeline? It seems like a massive oversight.
     
  11. 5argon

    5argon

    Joined:
    Jun 10, 2013
    Posts:
    1,261
    I have reported a bug, and it is not related to DSP time mode. Mine used Game Time but the first few samples were obviously missing on each play. I duplicated the same audio clip successively on one TimelineAsset so one Play cause 4 plays separated by some silence.

    Only the first time on each PlayableDirector play sounds different with starting samples missing. So it is not a delay, if you place the clip elsewhere that's not at the beginning it's instant. (and would be better with DSP time mode)

    https://fogbugz.unity3d.com/default.asp?1167289_7t1ofosrlthhs3eo