Search Unity

Audio PlayClipAtPoint() truncating audio

Discussion in 'Audio & Video' started by Telkir, Jul 3, 2019.

  1. Telkir

    Telkir

    Joined:
    Jul 23, 2013
    Posts:
    2
    I'm using PlayClipAtPoint() to play sound files with no excess silence at the start or finish, such as this one:



    The problem is that Unity seems to occasionally destroy these oneshot sound objects too early, before the full clip has finished playing. Because the sound is quite short (less than 200 ms) and used quite often in my game, it's easy to notice the truncation whenever it happens - not every time, but randomly frequent enough.

    I can probably work around this by just editing in some silence at the end of each clip, but wondered if this was a known limitation or bug of Unity's audio system, or if I was somehow doing anything wrong.
     
  2. Baydogan

    Baydogan

    Joined:
    Mar 22, 2018
    Posts:
    54