-
-
Notifications
You must be signed in to change notification settings - Fork 10.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Flood records in console window: [server] WARN: Colud not get any audio timestamp
#3812
Comments
Thank you for your report.
So this means that According to the documentation, this happens when the buffer is not a direct buffer, which is also unexpected (it's a buffer from MediaCodec). Could you please paste the output of |
If read() returns 0, then there is no data. According to the documentation, it happens if the buffer is not a direct buffer: <https://developer.android.com/reference/android/media/AudioRecord#read(java.nio.ByteBuffer,%20int)> Refs #3812 <#3812>
I can reproduce on my Android 11 device by disabling some workarounds: diff --git a/server/src/main/java/com/genymobile/scrcpy/Server.java b/server/src/main/java/com/genymobile/scrcpy/Server.java
index 5800487da..3e5985ac8 100644
--- a/server/src/main/java/com/genymobile/scrcpy/Server.java
+++ b/server/src/main/java/com/genymobile/scrcpy/Server.java
@@ -83,11 +83,6 @@ public final class Server {
// - <https://github.com/Genymobile/scrcpy/issues/994>
boolean mustFillAppInfo = Build.BRAND.equalsIgnoreCase("meizu");
- // Before Android 11, audio is not supported.
- // Since Android 12, we can properly set a context on the AudioRecord.
- // Only on Android 11 we must fill app info for the AudioRecord to work.
- mustFillAppInfo |= audio && Build.VERSION.SDK_INT == Build.VERSION_CODES.R;
-
if (mustFillAppInfo) {
Workarounds.fillAppInfo();
} On |
Here are the required log entries: |
Oh, these logs show a different issue, it's not "Could not get any audio timestamp" but "Buffering threshold exceeded". See #3793. In particular, replace this binary: #3793 (comment) |
Environment
Flood records in console window (several lines per second(!)):
[server] WARN: Colud not get any audio timestamp
The text was updated successfully, but these errors were encountered: