Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

Sound play early when timescale is not 1 in Timeline

Discussion in 'Timeline' started by Suika, Dec 20, 2017.

  1. Suika

    Suika

    Joined:
    Nov 19, 2013
    Posts:
    33
    Hi Everyone. I have a problem with timeline.

    My timeline set up as picture shows.

    The BulletTimeWithBeginPlayable is Modified BulletTimePlayable from Timeline's Demo code.

    It will change timescale and slow the timeline.

    My problem is : The Audio clip in red box with red arrow should play in frame 315, but when timescale is not 1,
    you will heard the the Audio clip sound in frame 313 and that make all scene weird because timeline is not even get to frame 315(Because timescale is slow).

    圖片 4.png


    Anyone know this issue and solution? Thx!!

    PS. Sorry for my poor English.
     
  2. seant_unity

    seant_unity

    Unity Technologies

    Joined:
    Aug 25, 2015
    Posts:
    909
    I suspect this is a bug. The audio track is scheduled against the DSP clock, and it looks like the timescale is not being accounted for when the scheduling is performed.

    The scheduling takes place ~0.1 second before the clip is played. Which may account for the small error you are seeing.

    If that coincides with what you are seeing, please file a bug with repro steps.

    For sample accurate timing, it's recommended to set the PlayableDirector to use the DSP clock as it's update mode, but that assumes no time scaling.