mozilla / cubeb-coreaudio-rs

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

Use a VoiceProcessingIO AudioUnit with bypass enabled instead of a regular AudioUnit on top of a drift-corrected aggregate device when in VOICE mode #185

Closed Pehrsons closed 11 months ago

Pehrsons commented 1 year ago

The drift corrected aggregate device is resulting in distortions due to drift, and we do not really understand why. The VoiceProcessingIO AudioUnit handles drift properly.

This is the workaround fix for https://bugzilla.mozilla.org/show_bug.cgi?id=1670633.

Note that the VoiceProcessingIO AudioUnit enables system wide ducking on other output streams while running. We set it to bypass mode for now since there is not yet an API to toggle processing features dynamically, as would be needed by Firefox through MediaStreamTrack.applyConstraints.

Pehrsons commented 1 year ago

Since VoiceProcessing code is used behind a pref

Define pref?

ChunMinChang commented 1 year ago

Since VoiceProcessing code is used behind a pref

Define pref?

What I meant was that whether the vpio is set is by checking the cubeb_stream_prefs's flag.

padenot commented 11 months ago

Stealing the review from @ChunMinChang who is busy, this has been reworked significantly and there are green tests now (locally and on CI).