obs-studio icon indicating copy to clipboard operation
obs-studio copied to clipboard

libobs: Mix audio of each source in a scene only once

Open derrod opened this issue 1 year ago • 1 comments

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.

derrod avatar Apr 14 '24 12:04 derrod

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.

Warchamp7 avatar May 02 '24 20:05 Warchamp7