Skip to content

Conversation

@pkviet
Copy link
Member

@pkviet pkviet commented Dec 14, 2025

Description

When an Audio Output Capture source (AOC) like 'Desktop Audio' has monitoring_type == OBS_MONITORING_TYPE_MONITOR_ONLY, deduplication should not be triggered. this is an edge case which may not cover a reasonable use case, but for the sake of completeness, we deal with it.

Motivation and Context

Fix bug reported by @Penwy

How Has This Been Tested?

Bug is fixed on windows 11 25 H2.
Deduplication is not triggered if AOC is monitor_only.
Tested on a sine signal: the level stays nominal.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • My code has been run through clang-format.
  • I have read the contributing document.
  • My code is not on the master branch.
  • The code has been tested.
  • All commit messages are properly formatted and commits squashed where appropriate.
  • I have included updates to all appropriate documentation.

When an Audio Output Capture source (AOC) like 'Desktop Audio' has
monitoring_type == OBS_MONITORING_TYPE_MONITOR_ONLY, deduplication
should not be triggered. this is an edge case which may not cover a
reasonable use case, but for the sake of completeness, we deal with it.

Signed-off-by: pkv <[email protected]>
@PatTheMav
Copy link
Member

Just to wrap my head around this:

  • I capture desktop audio output
  • I have desktop audio output set up as my monitoring device
  • The audio output capture source is set to "only monitor"

Wouldn't this lead to a feedback loop? Because we're continuously feeding the captured desktop audio output back into the output (while nothing will be output on stream)?

@pkviet
Copy link
Member Author

pkviet commented Jan 15, 2026

Just to wrap my head around this:

  • I capture desktop audio output
  • I have desktop audio output set up as my monitoring device
  • The audio output capture source is set to "only monitor"

Wouldn't this lead to a feedback loop? Because we're continuously feeding the captured desktop audio output back into the output (while nothing will be output on stream)?

there can't be a feedback loop because Desktop Audio and all AOC sources have the OBS_SOURCE_DO_NOT_SELF_MONITOR flag which is enforced here:

What happens is that an AOC set to 'monitor only' is neither monitored nor on the output; so why the hell, would users set the AOC to that ? i have no clue.
But if an AOC does not output, there is then no reason to silence the monitored sources, hence the check added in this PR.
Tbh it is a silly edge case ... which led to discussions in dev channel as to whether this really needs fixing.
But the fix is trivial.

Copy link
Member

@PatTheMav PatTheMav left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair enough, though the whole automatic muting system has gotten so arcane that it's really hard for anyone to follow who is not actively working on it.

In this case it depends on another (non-documented) automagic internal functionality to work rather then letting failure scenarios simply fail just because OBS is used as a crutch to fill an obvious missing piece in a streaming setup (in some cases: a USB audio device).

@pkviet
Copy link
Member Author

pkviet commented Jan 16, 2026

Fair enough, though the whole automatic muting system has gotten so arcane that it's really hard for anyone to follow who is not actively working on it.

In this case it depends on another (non-documented) automagic internal functionality to work rather then letting failure scenarios simply fail just because OBS is used as a crutch to fill an obvious missing piece in a streaming setup (in some cases: a USB audio device).

I agree; if asio became the streaming standard on windows, we would not have such issues about monitoring and desktop capture of a game. Tbh I wasn't even aware of those issues because i mainly use an asio device for direct monitoring ... Should a software become a crutch to people who don't have the right equipment ? that's a policy decision above my level. But there's a case to be made that obs is so popular that we should take into account people who just don't have either material means or technical level to deal with external sound devices. So I can hear arguments on both sides.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants