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

Watching the alive status for all the running devices #170

Draft
wants to merge 4 commits into
base: trailblazer
Choose a base branch
from

Conversation

ChunMinChang
Copy link
Member

We should monitor the alive status of both input and output devices in use. We used to watch input device only. With the code in this PR, we are able to watch the alive status of all the running devices when user doesn't follow the system default devices. If any user-selected device is unplugged before it's destroyed, we should fire an error callback.

This patch implements the code to monitor the alive status of both input
and output devices in use. We used to watch input device only. With the
changes here, we are able to watch the alive status of all the running
devices when user doesn't follow the system default devices. If the
watched device is unplugged before it's destroyed, we will fire an error
callback.
@ChunMinChang ChunMinChang self-assigned this Mar 31, 2022
@ChunMinChang ChunMinChang linked an issue Mar 31, 2022 that may be closed by this pull request
@padenot
Copy link
Collaborator

padenot commented Apr 4, 2022

Does this solve a problem in practice?

@ChunMinChang
Copy link
Member Author

ChunMinChang commented Apr 7, 2022

Does this solve a problem in practice?

I believe this relates to setSinkId. Now if the user-selected/non-default output device is unplugged while it's playing, the underlying stream will stop playing behind the scenes without notifying gecko to tear down the related variables or settings.

In addition, cubeb already does this job in WASAPI and PulseAudio backends so this makes cubeb behaves the same way on CoreAudio backend.

@padenot
Copy link
Collaborator

padenot commented Apr 7, 2022

Sure, ok, I really wasn't sure what this was about, let me know when it's ready!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fire error callback when non-default output device is unplugged
2 participants