mozilla / cubeb-coreaudio-rs

The audio backend of Firefox on Mac OS X.
ISC License
25 stars 10 forks source link

Fire error callback when non-default output device is unplugged #159

Open ChunMinChang opened 2 years ago

ChunMinChang commented 2 years ago

Now we disable the automatic input device switching when the input device is unplugged. We will fire an error callback and enter an error state if this happens. However, we never monitor the alive status for output device. If the output device doesn't follow the default, then the stream will probably stop working without firing an error callback. Now the cubeb users rely on device-collection changes to know the device is gone.

To align with the policy we have for microphone switching, we should do the same for the output device.