iOS - Audio Lag?

Hello,

I have an audio file thats played through my AudioSource every time the user taps on the screen. I’ve noticed that there is a slight lag between me touching the screen, and the audio playing, about 0.2 second of a lag. It doesn’t seem like much, but when you’re playing the game - it can be very off putting.

What I’ve done:

  • Made sure the audio actually starts playing at the very start of my audio clip
  • Made it into a WAV (I read they’re better for iOS)
  • Decompress the audio on load
  • Made it a 2D audio (its supposed to be 2D anyway)

Yet there is still a delay, why is this? Its only a small file (144KB)
Thanks

There’s a bit of lag inherent to the touch event and your framerate, but I bet the problem is that want a smaller Audio DSP Buffer. Bigger buffers will stutter less, but have higher latency. Try something smaller for you. Once you do that, you can probably even use compressed audio and be fine.