frontend: Fix audio mixer preview for groups and subscenes#13509
Open
kajalkattige30 wants to merge 1 commit into
Open
frontend: Fix audio mixer preview for groups and subscenes#13509kajalkattige30 wants to merge 1 commit into
kajalkattige30 wants to merge 1 commit into
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
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.
BEFORE:
MUSIC SCENE -

GROUP SCENE -

NESTED SCENE -

AFTER:
MUSIC SCENE -

GROUP SCENE -

NESTED SCENE -

How Has This Been Tested?
OS Version: macOS.
Scenarios Executed:
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: