libobs, win-wasapi: Enable channel routing for Audio Input Capture#12942
libobs, win-wasapi: Enable channel routing for Audio Input Capture#12942pkviet wants to merge 3 commits intoobsproject:masterfrom
Conversation
PatTheMav
left a comment
There was a problem hiding this comment.
Looks fine to me overall, also tested this with an virtual 6-ch audio device and allowed me to map them as expected.
Haven't done in-depth checks whether the audio is correctly routed though.
b044cb4 to
0922dcc
Compare
|
Just built this pr from the current master. |
0922dcc to
1594d91
Compare
yes there was a regression but it is fixed with last push |
Because I want to avoid an uncontrolled upmix or downmix. |
This adds a function allowing to set a custom channel matrix, allowing channel rerouting. This is useful when sources provide layouts not supported by obs or to correct incorrect channel assignments. Signed-off-by: pkv <pkv@obsproject.com>
This adds a hint for the 'downmix' checkbox. It is likely unclear to users what this checkbox does or does not. When disabled, it allows channel selection; when enabled it lets obs deal with speaker layout mismatches between source and obs. Signed-off-by: pkv <pkv@obsproject.com>
This adds the capability to select input channels exposed to obs. (The same is already possible for coreaudio input sources.) Signed-off-by: pkv <pkv@obsproject.com>

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: