obs-studio
obs-studio copied to clipboard
libobs: Mix audio of each source in a scene only once
Description
Only mix audio of each unique source in a scene once.
Motivation and Context
Fixes a common pitfall as the constructive interference due to multiple scene items using the same source is not visible anywhere.
Based on discussions this should not happen.
How Has This Been Tested?
Pure sine wave media source and ffmpeg volumedetect to make sure recordings after this fix have the same volume as a recording with only one scene item.
Types of changes
- Bug fix (non-breaking change which fixes an issue)
Checklist:
- [x] My code has been run through clang-format.
- [x] I have read the contributing document.
- [x] My code is not on the master branch.
- [x] The code has been tested.
- [x] All commit messages are properly formatted and commits squashed where appropriate.
- [x] I have included updates to all appropriate documentation.
This solves duplicated scene items causing multiplied audio and LGTM.
Outside of this PR, we still need to solve scene items inside nested scenes causing the same issue.