google / oboe

Oboe is a C++ library that makes it easy to build high-performance audio apps on Android.
Apache License 2.0
3.72k stars 572 forks source link

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

Open lhran99 opened 5 days ago

lhran99 commented 5 days ago

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]

step1: Open the oboetest -> RECORD AND PLAY -> Set the Recorder setting as folllows: Image

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

step3: set the Perf to NONE, as follows: Image and repeat step2, here is the wav aaudio_recorder_without_low_latency.wav.zip

step4: Image

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 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.

philburk commented 1 day ago

@lhran99 - Thanks for raising this issue. I will report this to Samsung. We are also planning to add more volume and gain testing.