Android Screen recording doesn't record audio until restart of oboe stream
Android version(s): Android 16 Android device(s): Pixel 8a Oboe version: 1.9.3 App name used for testing: Mini Piano Lite, OboeTester
Short description I got a Pixel 7a user reporting that when he screen records my app, the audio is not recorded. I investigated and could reproduce on Pixel 8a.
Steps to reproduce
- Open target app
- Go to quick settings of Android to screen record, enable device audio and select the app.
- Go back to the app
- Play sounds while recording
- Stop recording and find that there is no sound at all in the recording
Expected behavior The recording contains the played sounds
Actual behavior The audio is silent in the recording When the recording is started, and I then close and reopen the stream, then it suddenly does show up in the recording.
Device Pixel 8a, Pixel 7a
Any additional context I also have the same on OboeTester. I open stream, then start recording process, then press play, and stop recording after a few seconds. No audio is in the recording, while the oboetester app did produce sound.
I did add
builder.setAllowedCapturePolicy(oboe::AllowedCapturePolicy::All);
and also the manifest, but this did not have any impact. Since also Oboetester is affected, that seems not to cause the problem.
We currently don't support playback capture on the MMAP path. Thanks for filing the bug