Skip to content
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] Handle device disconnected error #66

Open
basharovV opened this issue Dec 30, 2024 · 0 comments
Open

[audio] Handle device disconnected error #66

basharovV opened this issue Dec 30, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@basharovV
Copy link
Owner

When a device is disconnected, the following error causes the audio thread to panic and the app needs to be restarted:

ERROR Musicat::output::cpal:audio output error: The requested device is no longer available. For example, it has been unplugged.

To handle this, the error needs to be handled in the audio callback in output.rs and an event emitted to the AudioPlayer (handled in decode_loop) to re-init the audio device with the current default device.

@basharovV basharovV added the bug Something isn't working label Dec 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant