google / google/oboe

why the audio volume captured using oboe lowlatency by aaudio/opensles is obviously lower than non lowlatency mode?

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

Description

I find that many android devices have the issue, the audio volume captured using oboe low latency by aaudio/opensles is obviously lower than non low latency mode, here is my test:

device info:
ro.product.brand = samsung
ro.product.manufacturer = samsung
ro.product.model = SM-G988N
ro.product.device = z3q
ro.product.cpu.abi = arm64-v8a
ro.build.description = z3qksx-user 13 TP1A.220624.014 G988NKSU1HVJG release-keys
ro.hardware = qcom
ro.hardware.chipname = SM8250
ro.arch =
| grep aaudio = [aaudio.hw_burst_min_usec]: [2000]
[aaudio.mmap_exclusive_policy]: [2]
[aaudio.mmap_policy]: [2]

step1:
Open the oboetest -> RECORD AND PLAY -> Set the Recorder setting as folllows:
![Image](https://github.com/user-attachments/assets/87b613d0-3c0e-4ec6-bcd0-45c4e487d1fd)

step2:
click the RECORD button and start record for some seconds ,then click STOP, here is the wav:
[aaudio recorder with low latency.wav.zip](https://github.com/user-attachments/files/17826848/aaudio.recorder.with.low.latency.wav.zip)

step3:
set the Perf to NONE, as follows:
![Image](https://github.com/user-attachments/assets/c10bf875-4876-48a4-a99c-409d34f6e734)
and repeat step2, here is the wav
[aaudio_recorder_without_low_latency.wav.zip](https://github.com/user-attachments/files/17826849/aaudio_recorder_without_low_latency.wav.zip)

step4:
![Image](https://github.com/user-attachments/assets/8d600e0e-eae1-43b7-b2e3-c93de73c1379)

The first wav volume is obviously lower than the second one.

When i choose API to opensles, then has the same issue, the was as follows:
[opensles_recorder_with_lowlatency.wav.zip](https://github.com/user-attachments/files/17826914/opensles_recorder_with_lowlatency.wav.zip)
[opensles_recorder_with_lowlatency.wav.zip](https://github.com/user-attachments/files/17826918/opensles_recorder_with_lowlatency.wav.zip)

Then i do the test on other device, here is the result:

SM-S908N G4083 12 weak capture
SM-N960N GB036 10 ok
SM-N986N G9081 12 weak capture
SM-G977N GB037 12 ok
SM-N976N GB044 12 ok
SM-G986N GE067 12 weak capture
SM-N981N GF054 11 weak capture
SM-G996N GH019 13 weak capture
SM-G998N GH020 11 weak capture
SM-G991N GH088 11 weak capture
SM-A325N GH240 11 ok
SM-F711N GH267 14 weak capture
SM-S901N GH269 13 weak capture
Pixel 6a GH698 15 ok
SM-A235M GH484 13 weak capture
SM-S911N GH877 14 weak capture

It seems that 11/16 = 68.75% of devices have the same issue.

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.