radxa / manifests

91 stars 38 forks source link

Tweaking Android audio buffer size #42

Open vanfanel opened 1 year ago

vanfanel commented 1 year ago

Hi,

I have several Rock 5B boards, and I am investigating a low-latency audio application on it using Android (Vulkan is a must). This app uses opensl as the sound output API, and opensl won’t do anything with custom audio buffer sizes set from the apps.

I know that, for other Android platforms, it’s possible to tweak the Android audio buffer size by editing system files, like for example /vendor/etc/audio_pcm.xml

Sadly, /vendor/etc/audio_pcm.xml is absent from the Rock 5B Android disribution. So, how can the audio buffer size be edited/changed in the Rock 5B Android distribution?

It’s currently set to 480 block frames, apparently, and it should be possible to change it by editing Android system files, but what files should be edited to do so?

Thanks!

vanfanel commented 1 year ago

Seems to be related to /vendor/etc/audio_policy_configuration.xml, but what would be the buffer size setting??