-
-
Notifications
You must be signed in to change notification settings - Fork 11k
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
Crash when no sound device is plugged in #4800
Comments
(it does not crash, it just closes with an error) Run |
Seems like it should automatically skip trying to output audio when no device is available instead instead of closing with an error. |
If the audio capture fails on the Android side, there is a mechanism to accept missing audio (because it is expected that audio is not supported on Android < 11, and However, if there is a problem on the client side, it's more complicated, because the audio device opening failure happens after the device capture is started on the device side (the opening parameters theoretically depends on the decoder format, so the audio stream must be started and decoded). If audio device opening fails, we could drop all decoded audio frames (as if we played silence), but the behavior would be unexpected: the audio would be forwarded (i.e. captured and disabled from the device), but not played from the computer either. I understand that if audio client fails, we would like the same behavior as if we passed Or we might check before starting the server if at least one sound card is available, to implicitly enable |
Environment
When a sound is played on the phone and there is no sound device plugged into the aux of the computer.
SCRCPY crashes with an error message:
The text was updated successfully, but these errors were encountered: