SFX played with slight delay

  • I decited to import some sound effects in my game. Everything looks legit when played on notebook but when played on Android there is a slight delay for one of the sounds. So when object is destroyed sound is called about 1 second after.. I did some research and this appears to be normal issue for Android devices, because of their performance. I also reduced latency, which means a slight delay, but i dont think this will solved the problem entirely. I even changed scripts that manage sounds, couple of times, different ways and it still didn't solve the problem? Did anyone had experience like this?

    Idk if i should do object pooling here or it's normal to just do Raycast or something simillar in front of that object that is going to start sound effect earlier ?

    (This image explains my problem in a bit different way ^^)

  • Now that you mention this, yes ... I'm having that delay in my project as well, but I did nothing about it yet. It's a slight delay, not as long as 1 entire second, but it becomes noticeable if you play enough times.

    Definitively this is something that we need to solve.

    There are some answers here that may come in handy. I'll read it better tomorrow, it's late here and I'm about to go to bed :)


  • Man i've seen those yesterday. My delay is couple of frames, less then a second.

    It will probably be solved if you purchase Native Audio or Master Audio plugins, no doubts. It all deppends of the game, if big, then those plugins will be good solution, if small and simple then this can be masked by using OnTriggerEnter in front of that object, but this wont solve the issue.

    I think this can be solved on a different way, I haven't tried pooling yet..

  • I think i've got it solved... I've changed the Load Type to "Decompress on Load" and Compresion format to "Vorbas" with Quality reduced from 100% to 70% of my sound. This reduced imported file size and enabled quicker CPU execution of my sound( which solved my problem) while RAM usage stays the same. I've used .wav compression type which is lossless and easier to process, unlike with .mp3. If i remember correctly i've changed the Buffer size too... So from now on, for short sounds i advise to use .wav and .mp3 for longer, like background sound. Learned a lot, after today's research!