Don't show volmeters on Game Capture sources unless "Capture Audio" is set #683
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
Game Capture sources have a volmeter even when "Capture Audio" isn't checked in settings.
When the option to capture audio was added to game capture, OBS_SOURCE_AUDIO was added to output_flags on obs_register_source for ALL game capture sources. The fix is to check the source's settings and update output_flags accordingly. This is handled in game_capture_update because that is where new settings are processed. A source's output_flags aren't directly editable so I added a function to obs-source.c to handle this, similar to the streamlabs_force_source_ui_refresh function.
Motivation and Context
Asana ticket
How Has This Been Tested?
Tested game capture with audio turned on and off to verify volmeters only show when needed.
Types of changes
Checklist: