-
-
Notifications
You must be signed in to change notification settings - Fork 21.2k
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
Audio input gets muted after a while on android #86428
Comments
Did some debugging and it looks like the issue is in godot/servers/audio/audio_stream.cpp Lines 324 to 373 in fe01776
Buffer underrun is happening, which results in not returning p_frames , which results in deleting AudioStreamPlaybackMicrophone instance.godot/servers/audio_server.cpp Lines 386 to 400 in fe01776
Not really sure what the solution would be, but hope that it helps. |
#73162 would almost certainly have fixed this, you can try it as a workaround if you're okay building the engine yourself. It should have no adverse effects, it's just a fix for an oversight on my part in #51296. Juan decided that we should fix this class of bug in the streams though so this will require a contributor to add underrun handling to the microphone audio stream. |
I also encountered the same problem under Android, which is particularly unstable when recording. After recording for a while, I found that: |
Tested versions
4.1.1,4.2 (all devs and betas), 4.2, 4.2.1
mono and regular, tried them all
System information
MacOS, Sonoma 14, M1 pro -> Problem on Android (tested on 10 - 13)
Issue description
When recording audio with this minimal project, the audio input gets muted for no apparent reason.
This was a problem on many of my projects and i finally made a minimal project to troubleshoot and same issue.
This only happens on Android, but not on my mac.
Record_2023-12-22-11-41-42_8bd7053a4dd190e81637918be72deb46.mp4
In the video above i was talking and making noise, the bar at the top displays the volume.
You will see it drop to 0 permanently after a while, this was not from me stopping but from the app not detecting any audio input anymore.
The audio file is muted from that part on as you'd expect.
I have tried messing around with mix rate, stereo, other random settings, audio focus an threads but with no luck.
I believe there is some issue in the godot backend
Steps to reproduce
Install android build template on the minimal project.
Install on android.
Start recording.
Watch how it just mutes permanently after a while.
The muted thing resets after restarting the audio recorder.
Minimal reproduction project (MRP)
AudioRecord test.zip
The text was updated successfully, but these errors were encountered: