libobs, win-wasapi: Enable channel routing for Audio Input Capture #12942
+309
−11
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
On libobs side, this adds the capability for the audio resampler (relying on swresampler lib) to
set a matrix for routing of channels.
On win-wasapi side, this applies the new capability to enable channel selection.
This brings parity to wasapi input capture with coreaudio input capture on macOS.
Screenshots
Motivation and Context
One motivation for that feature are devices which separate stereo inputs.
So if a mike is connected to , say, Input 1 while nothing is connected to Input 2, wasapi usually treats them as
stereo pairs and when obs audio is set to Stereo, the captured Right channel will be silent.
With channel routing capability, it is now possible to duplicate the left channel to the right and have a consistent level.
The issue was brought to my attention by @Fenrirthviti
How Has This Been Tested?
Tested on windows 11 pro 25H2 w/ a logitech webcam + USB sound board.
Disabling the downmix cehckbox enables channel routing.
Swapping between devices resets the channel selections.
Changing the channel selections updates the captured channel.
Types of changes
Checklist: