google / oboe

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

Help to resolve Samsung devices support 3.5 mm headphones and Type C headphones. #1999

Open nguyenquynh201 opened 2 months ago

nguyenquynh201 commented 2 months ago

Android version(s): 13 Android device(s): SM-A325F

Device SM-A325F (Samsung A32)

App name used for testing: LiveEffect

Currently, when testing with your sample and my project, I noticed that when using a 3.5 mm headphone jack, numOutputFrames returns the same synchronized packet, but when using Type C headphones, numOutputFrames returns different packets. I hope to receive support from you, and please let me know what additional information you need so I can provide it.

image
philburk commented 2 months ago

The 3.5mm jack and the USB jack are different devices. I suspect the 3.5mm jack supports MMAP but the USB jack does not. That can cause a difference in their behavior.

There is no guarantee that numOutputFrames will be consistent. It will certainly vary if sample rate conversion is involved.

Let us know if you have more questions or close this Issue.