Audio stutter when using buffer size 256

I’m playing around with some custom audio processing and when I set Unity to 256 buffer size I get occasional sound artifacts.

1024 and 512 work fine but I need the low latency of 256. I’ve tested it on Unity 2017.1.1, 2017.2, and 2017.3 which had a big audio update. Apparently this wasn’t addressed.

There is a trade off with using a smaller audio buffer size in that the system must schedule audio render callbacks more often. The sound artefacts that you hear could be related to this.

Are you sure that you need a latency of 256 frames per cycle? This is approximately 5.8ms at 44.1kHz, with 512 being 11.6ms.

If you are, you could look into native audio plugins. This will offer less overhead than calling into OnAudioFilterRead every render cycle (assuming that’s where your custom processing is).

andy.