Add native AAudio low-latency renderer#567
Conversation
|
This is very interesting. I didn't think it could be solved. Assumed it's just the buffer size that Google's chosen and that's it. Curious why adding a USB DAC workaroubds the issue. Whether it uses lower latency to begin with. |
|
Thanks for the PR, have you verified this still work with surround sound on AVR systems? |
Sorry I have been unable to test on anything other than my setup using just my tv's speakers. Apologies for the limited test surface. |
|
Maybe it could be exposed as an experimental setting in the nightly build until it's been tested by more users. |
I would do exactly that. Would avoid most opposition and should make the maintainers calmly merge it. |
|
Okay would just like to see what the maintainers say before I put any more into the PR |
|
Thank you very much! This is what I was looking for for a long time. How can I download a build with this change incorporated? |
|
@olibols Would you be able to provide a build? Would love to try it out on my TV without setting up the entire Android SDK suite on my machine. |
Summary
enableAudioFxis passed to the renderer instead ofplayHostAudio.Motivation
Some Android TV devices appear to deny AudioTrack's fast/low-latency output path even when Moonlight requests it, which can cause noticeable delayed audio while video and input latency remain low. A Google TV Streamer on Android TV 14 showed roughly 0.5s-1s delayed audio with the existing AudioTrack path.
The native AAudio callback path fixes the issue on that device in testing while preserving AudioTrack fallback for compatibility.
Related issues
This should address the same class of Android TV audio-latency reports as:
Implementation notes
Tested
app-nonRoot_game-armeabi-v7a-debug.apkon Google TV Streamer.