google / oboe

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

Audio streams have high latency on Windows 11 #1685

Open Nordhal opened 1 year ago

Nordhal commented 1 year ago

Android version(s): WSA Android 12 Android device(s): Windows 11 Oboe version: 1.6.1 App name used for testing: Remixlive

Hi, I am not sure if this should be considered as a "bug" for Oboe (and if not, please close this), but when testing our app on Windows Subsystem for Android, even if I try OpenSL, or AAudio, the opened stream does not appear to have a low latency path at all. The buffer size returned is very high, and when closing & reopening a stream, it can lead to an ANR. Did you experienced the same on your side ? Is it a bug to be reported to Microsoft instead ?

Thanks in advance and happy holidays !

peterdk commented 1 year ago

Same experience. I just got a laptop with Windows 11 and tested my piano app. Buffersize is 5764 frames when using AAudio Oboe. In practice you experience 500ms delay or even more when pressing a key.

philburk commented 1 year ago

We often see problems with high latency on emulators. The Android on Windows is a kind of emulator. But 5764 is very high. Is that the burst size or the buffer capacity? 5764 frames at 48000 Hz is 120 msec.

This sounds like a Microsoft problem. Please report it it to them. We will also try to report it. It will help to hear from both of us.