-
-
Notifications
You must be signed in to change notification settings - Fork 8.8k
libobs: Various fixes for monitoring deduplication #12671
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Monitoring deduplication must be applied only to tracks for which the monitored source and the 'Audio Output Capture' source are both enabled. This adds such checks. Signed-off-by: pkv <[email protected]>
|
I can confirm this fixes the bug I reported. |
Pulse audio may append .monitor to device id; this commit adds this case to the deduplication trigger. Signed-off-by: pkv <[email protected]>
|
Update |
|
Confirming the two additional issues listed are fixed by this on my end. |
|
Confirmed 1 and 3 are fixed on Windows. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I quite honestly lost track of the decisioning logic behind this automagic feature and don't feel like I can review this without a proper logic flowchart.
@pkviet can you whip up a chart that represents that conditional logic behind all these changes?
It feels as if we're just bolting on more and more exceptions and further checks here and get lost in the woods. It feels very much like "deduplicate, except on Mondays, if it rains, but only if it didn't rain the Thursday before, except during a leap year" to me right now.
|
@PatTheMav
|
Thank you, that was indeed very helpful. |
|
Update |
When the 'Audio Output Capture' source (usually Desktop Audio) has its fader at minimum, we should disable the deduplication logic. This is done by checking against the obs_source volume member. Signed-off-by: pkv <[email protected]>

Description
This fixes several bugs reported in audio-support and dev channels of our Discord server.
Motivation and Context
Fixes 3 bugs.
Bugs reported by @Penwy & @prgmitchell
Bug 1 fix:
If the AOC has, say, tracks 1 2 3 enabled but not 4 5 6, and the monitored source has tracks 2 & 5 enabled,
the duplication occurs only on track 2.
So the silencing should occur on track 2 but not the others (track 5 in the example).
The bug fix checks then which tracks are common to AOC and monitored source and silences only them.
Bug 2 fix:
we allow for a looser device id match on linux by strncmp in addition to strcmp.
Bug3 fix:
we add a fader_muted member of obs_source; it is set to false unless the fader cur_db is below min_db.The deduplication logic is now bypassed whenever the Desktop Audio is either user_muted or fader_muted.
We check against source->volume for the AOC; if it is detected to be 0 , we treat it as 'muted' and bypass deduplication logic.
How Has This Been Tested?
Bug 1: Checked by breakpointing that the silencing did not occur any more for tracks which are not common to both AOC
and monitored source.
Bug 2 : not checked. Waiting for linux testers.
Bug 3: Checked by making a recording. The monitored source set to monitor_and_and_output was still heard in the recording even though the desktop audio fader was at minimum.
Types of changes
Checklist: