mozilla / cubeb-coreaudio-rs

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

Allow requesting the native supported number of input channels with voice processing #197

Closed Pehrsons closed 10 months ago

Pehrsons commented 10 months ago

The Voice processing AudioUnit is mono-only. With voice processing we open it in mono regardless of what was requested. If more channels than that were requested some asserts will fail.

There is currently no API to query how many input channels one could get -- there is no way to know for certain whether voice processing will be used either so no assumptions can be made. Instead, this PR makes the buffer manager able to upmix audio when the input is mono. From before, one cannot init a stream for a number of input channels higher than what the requested input device has (see setup()).