mozilla / cubeb-coreaudio-rs

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

Fix device reinit when no input/output device are present #173

Closed padenot closed 2 years ago

padenot commented 2 years ago

Per https://github.com/mozilla/cubeb-coreaudio-rs/pull/171#pullrequestreview-933864519.

@ChunMinChang: First commit really is just the revert / merge. Second one implements your suggestion:

padenot commented 2 years ago

What do you want to do about this failure now? Can we just stop asserting everything?

ChunMinChang commented 2 years ago

I believe the reason you need to remove all the assert is that you remove the get_default_device as well. Using match create_device_info(kAudioObjectUnknown, DeviceType::XXX) for reinit should achieve the goal I guess

ChunMinChang commented 2 years ago

I am going to merge this since it should fix the problem now.