Open ChunMinChang opened 2 years ago
Does this solve a problem in practice?
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.
Sure, ok, I really wasn't sure what this was about, let me know when it's ready!
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.