mozilla / cubeb

Cross platform audio library
ISC License
439 stars 124 forks source link

Switch device only when the users don't specifiy a particular device #697

Closed ChunMinChang closed 2 years ago

ChunMinChang commented 2 years ago

We should not switch device behind the scenes if the user asks to use a particular device. If the user-selected device is unavailable, we should fire an error callback to notify the user so they can take the actions by their needs.

ChunMinChang commented 2 years ago

This is based on #696. I'll move it from draft to official PR once #696 is merged.

ChunMinChang commented 2 years ago

This implements the #694 for Windows part

ChunMinChang commented 2 years ago

Would you mind taking a look again? I misused the unique_ptr in my previous patch so I've updated it.

(P.S. I prefer squashing these commits since I need all of them at once to achieve https://github.com/mozilla/cubeb/issues/694, and it will be easier to revert it if I am unlucky)