Skip to content

plugins/compressor: Fix ducking trigger when sidechain source is muted#13448

Open
ShivaPlays wants to merge 2 commits into
obsproject:masterfrom
ShivaPlays:fix-sidechain-mute
Open

plugins/compressor: Fix ducking trigger when sidechain source is muted#13448
ShivaPlays wants to merge 2 commits into
obsproject:masterfrom
ShivaPlays:fix-sidechain-mute

Conversation

@ShivaPlays
Copy link
Copy Markdown

Description

This PR addresses the issue where the compressor continues to duck audio based on its last known envelope state when the sidechain source is muted or becomes inactive. The implementation introduces a graceful release decay using the configured release time when the sidechain source is unavailable or muted, preventing sudden volume jumps and ensuring consistent gain behavior. It also preserves standard self-compression functionality when no sidechain is configured.

Motivation and Context

This change fixes #13170.
Currently, when a sidechain source is muted in the OBS audio mixer, the compressor retains its previous gain reduction level instead of releasing. This results in audio remaining "ducked" even when the sidechain is muted or inactive. This fix ensures that the compressor behaves predictably by treating an inactive/muted sidechain as a signal for a natural release curve.

How Has This Been Tested?

I have verified this fix on a local build of OBS Studio.

  • Test Case 1 (Sidechain): Created an audio output source with the Compressor filter using a sidechain. Observed that muting the sidechain source now triggers a smooth release decay instead of holding the gain reduction.
  • Test Case 2 (Standard): Created an audio input source (microphone) with a Compressor filter without a sidechain. Verified that standard self-compression remains fully functional and unaffected by these changes.
  • Environment:
    • OS: Kubuntu 26.04 LTS
    • KDE Plasma: 6.6.4 | Kernel: 7.0.0-15-generic
    • Hardware: AMD Ryzen 7 4800H, NVIDIA GTX 1660 Ti

Types of changes

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

Checklist:

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

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.

Compressor ducking source triggers even when muted

1 participant