mozilla / cubeb-coreaudio-rs

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

BMO 1737833 - Return error when reinit fails if input is not defined #141

Closed ChunMinChang closed 2 years ago

ChunMinChang commented 2 years ago

If the stream is output-only, or its input device is system-default, its reinit failure can lead to hitting an assertion in set_volume since the program keeps running as the error doesn't occur. We should return an error instead.

ChunMinChang commented 2 years ago

It surprises me that we didn't take care of it for years: https://searchfox.org/mozilla-central/rev/7241c1f9e94377b70b49cf702264269779c5c322/media/libcubeb/src/cubeb_audiounit.cpp#853-866. I should have caught it when rewritting