# Audio system time

The audio system has its own unique time coordinate system. The audio system time will increase monotonically according to the number of audio blocks actually processed (each audio rendering loop processes several audio blocks, and each audio block stores multiple audio sample frames). This time may not be synchronized with other clocks of the game system.
For the audio execution plan to play and plan to stop, the coordinate system of the planned time required is the audio system time coordinate system.

  • The current time of the audio system currentTime
    The current time currentTime of the audio system can be obtained through the API. It represents the time (in seconds) of the sample frame immediately after the last sample frame in the audio block processed by the audio system. The currentTime value is 0, which corresponds to the first sample frame time in the first audio block processed. That is to say, when the audio system is running, currentTime is monotonically increasing.
  • Audio system is paused
    Minimize mini games, WeChat clients running in the background, alarm clocks, phone calls, FaceTime calls, WeChat voice chats, WeChat video chats and other events will cause the audio to be occupied by the system, and the audio system of the mini game will be suspended at this time. That is to say, the audio system will not process any sample frames, and the current time of the audio system will remain unchanged. At this time, all sounds played via [Audio Source AudioSource] (./audioSource.md) will be paused. When the audio system is available again, its status will become running again, and the sound played by the automatically paused AudioSource will also automatically resume.
点击咨询小助手