mozilla / cubeb-coreaudio-rs

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

Do not reinitialize audio stream if its input device isn't changed #152

Closed ChunMinChang closed 2 years ago

ChunMinChang commented 2 years ago

Currently we can get system-default-device-changed event even when we choose not to use the system default device, and every time when we get that event, we will reinitialize the audio stream. This makes the stream be reinitialized even if nothing changes on its device.

We should only reinitialize the audio stream when something happens on its device. This PR fixes input part of #149. We don't monitor alive-status for output device for now, hence the patches here fixes only input part.