google / google/oboe

android.hardware.audio.low_latency reported as true but system hint low-latency reported as false

Open
#2,373 2 comments 0 reactions 2 assignees Claimed by @robertwu1 View on GitHub
bug
Dominant language
C++
Stars
4.1k
Forks
639
Avg merge
2d 23h
Merged PRs (30d)
8

Description

Android version(s):16
Android device(s): Motorola Edge 50 fusion
Oboe version: 1.10
App name used for testing: Latency Tuner (https://github.com/djshaji/latency-tester)
(Please try to reproduce the issue using the OboeTester or an Oboe sample.)

**Short description**
android.hardware.audio.low_latency reported as true but system hint low-latency reported as false. Output device latency ~ 100ms. ADB log says exclusive mode not supported, MMap not supported

**Steps to reproduce**
On my Motorola Edge Fusion 50, in Java, when I check for low latency, the system reports android.hardware.audio.low_latency as true. however, in Oboe, system hint low latency is false, and indeed, when I use the OnBothStreamsReady callback from the Liveeffect demo, the output latency is ~100ms. The same app used to work fine on my older Motorola g84, reporting a latency of ~30ms. My Samsung A15 reports a latency of ~22ms.

This is clearly not a bug in Oboe, as the same app works fine on other phones.

But since android.hardware.audio.low_latency is reported as true, I am hopeful maybe there might be some way or some tweak to reduce the output latency on this device. I've tried combinations of sample rate, number of channels, turning off "dolby atmos", but nothing helps.

I'm thinking this device does not support low latency audio, even though it reports android.hardware.audio.low_latency as true, as system hint low latency is false. But, this device was almost $300, and it's cheaper cousin which I bought for around $200 (moto g84) did support low latency.

Any thoughts?

Thanks and regards

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.