Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice
  3. Dismiss Notice

Question do you need to use playScheduled if all the layered music starts in 1 method?

Discussion in 'Audio & Video' started by Mike01923, May 1, 2024.

  1. Mike01923


    Jun 19, 2015
    I have three 2 minute audio tracks that are set to streaming. they are all started in one method via audioSource.Play(), and muted / unmuted when not needed.

    In testing they all seem to play in-sync, just wondering if there might be situations where they can de-sync
  2. SeventhString


    Unity Technologies

    Jan 12, 2023
    I think what you suggest would really be the safest, even if it could be seen as overkill. Considering audio samples are pulled by another thread, it is possible that with very unlucky timing, the two clips start a few milliseconds apart. But once they are started, I don't see how they could desync, unless you start playing with their pitch, or maybe doppler.
    Mike01923 likes this.