Skip to content

frontend: Fix audio mixer preview for groups and subscenes#13509

Open
kajalkattige30 wants to merge 1 commit into
obsproject:masterfrom
kajalkattige30:fix-preview-audio-groups
Open

frontend: Fix audio mixer preview for groups and subscenes#13509
kajalkattige30 wants to merge 1 commit into
obsproject:masterfrom
kajalkattige30:fix-preview-audio-groups

Conversation

@kajalkattige30

Copy link
Copy Markdown

Description

Fixes #13297
The original logic inside AudioMixer::updatePreviewSources() only iterated through a scene's flat, top-level items. The fix introduces a deep recursive traversal using obs_scene_enum_items to drill down into underlying sub-scene and group structures dynamically, ensuring their internal audio tracks are properly identified and populated in the UI.

Motivation and Context

Without this fix, users working in Studio Mode cannot view/monitor/play media or audio sources of grouped elements or nested scenes before transitioning them live to the Program output.
Additionally, a redundant, back-to-back duplicate sanity check on previewScene was removed.
image

BEFORE:

MUSIC SCENE -
image

GROUP SCENE -
image

NESTED SCENE -
image

AFTER:

MUSIC SCENE -
image

GROUP SCENE -
image

NESTED SCENE -
image

How Has This Been Tested?

OS Version: macOS.

Scenarios Executed:

  1. Created an empty QUIET scene.
  2. Created a MUSIC scene and added a media source file to it(music.mp3 audio). Ticked the loop property.
  3. Created a GROUP scene and added the existing music.mp3 audio source file to it
  4. Created a NESTED scene and added MUSIC scene as a source to it.
    Put the QUIET scene in PROGRAM. Verified all the other scenes in Preview mode and audio sources getting populated.

Types of changes

[x] Bug fix (non-breaking change which fixes an issue)

[x] Code cleanup (non-breaking change which makes code smaller or more readable)

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.

Implement deep recursive traversal via obs_scene_enum_items to ensure audio sources nested inside groups or sub-scenes properly populate the Audio Mixer when queued on the Preview canvas
@kajalkattige30 kajalkattige30 marked this pull request as ready for review June 1, 2026 09:17
@WizardCM WizardCM added kind/bug Categorizes issue or PR as related to a bug. kind/cleanup Non-breaking change which makes code smaller or more readable labels Jun 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/bug Categorizes issue or PR as related to a bug. kind/cleanup Non-breaking change which makes code smaller or more readable

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Audio Mixer preview doesn't show audio sources from groups or nested scenes

2 participants