


Also it will automatically manages which AudioTrack to use which is a limited resource per devices. SoundPool : There is a limit of about 1MB to use audio on this. It is a shortened version from this super long article. Here's more problems I think it is good to know if you want to do something native.

I made a native plugin that plays audio on Android, but. So, I guess you might want to add this hack to your native plugin too. (It is active even if I still haven't touch any AudioSource) Unity's built-in audio also requested 1 native source and I could observe Unity is also doing this "hack" as well. There is a hack in Native Audio that always keep playing silence on the idle native sources. (And many other Chinese phones apparently) One of the device I have Xiaomi Mi A2 has this problem. I have discovered that starting and stopping the native source will cause heavy lag on some devices with bad "audio policy". I made a native plugin that plays audio on Android, but on some device " each play" lags badly Native Audio could do faster but for the best built-in AudioSource latency the 2019.1 upgrade is important. In 2019.1 this threshold has been relaxed, more devices will get a better native sources. Some newer devices unfortunately has something that went over the threshold and got the "safe" (but slow) native sources. Unity initialize native resource with a certain "safe" settings based on certain threshold. Here you go! It's super long! Android's audio latency on Unity AudioSource is ridiculously bad, but the device is very new and other apps performs well I want to learn really deep about Android native audio Together with my users I have always been researching, and I think it would be better to keep it here together Q&A style here. In multiple years of maintaining this plugin, I have encountered and learned about so many problems and quirks both by myself and from bug reports from my users in the Discord channel. This article is not for advertising it, yet related to it. I do not care about functions in this plugin.

First of all a disclaimer, I am an author of Native Audio, a plugin used to skip Unity and use more native method to play audio on iOS and Android, without mixing, for minimum latency.
