Hello Nordhal,
In OpenSL ES, the latency can change if the audio is rerouted from one device to another. This can happen, for example, when the user switches from speaker to headset. My goal is to avoid that in AAudio by disconnecting the device when that occurs. The app has to reconnect but at least it knows the latency has changed. Note that in DP1, auto-routing can still occur in AAudio.
There is another way that latency can change in AAudio. That is if the app intentionally changes the effective size of the buffer. That is part of the latency tuning mechanism that allows an app to find the the lowest latency that does not cause underruns.
Phil Burk