The real time audio APIs are in native code and they can request for priority use when on foreground.
Samsung used to support real time audio on their S models since many years.
https://developer.samsung.com/galaxy/professional-audio
Which they are now deprecating as they also contributed to the design of AAudio.