Repository navigation
frontend: Mark audio sources in groups and nested scenes as Preview - #603
Merged
Merged
Conversation
AudioMixer::updatePreviewSources() collected the audio sources of the previewed scene with an inline lambda. Move that into CollectPreviewAudioSources() in frontend/utility so it can be tested without the mixer, and drop the repeated null check. No change in behaviour. Refs obs-rust#602. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…scenes test_preview_audio_sources builds real libobs scenes and groups with a dummy audio input and asks the Audio Mixer's preview helper which sources of the previewed scene it marks. A source in a group, in a nested scene, and in a group inside a nested scene are missed, although they play once the scene is in Program. Guards: a source directly in the scene, and a hidden group. Refs obs-rust#602. Co-Authored-By: Claude Opus 5.5 <[email protected]>
In Studio Mode the Audio Mixer only looked at the items directly in the previewed scene. A group or a nested scene is a single item without audio of its own, so the audio sources inside it were never marked as Preview, although they play once the scene is in Program. Walk visible groups and nested scenes too. Fixes obs-rust#602. Co-Authored-By: Warchamp7 <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
This was referenced Oct 13, 2026
zackees
added a commit
to rdoupe/obs-studio
that referenced
this pull request
Oct 13, 2026
cmocka.h defines inline for MSVC; the C++ standard library then stops with C1189 (xkeycheck.h). test_preview_audio_sources (obs-rust#603) and test_source_select_list (obs-rust#605) broke Rust Tier 2 on Windows. Local-Gate: v1 tree=18171423214d0ff1f389335b7ecfa6dfaa2a3325 secs=318 lanes=lint:run,rust-test:run,cross:run,tier2-linux:run Ci-Attestation: {"at":1791915462,"gate":"rust/all/fmt","host":"linux-x86_64","key":"a170de36a11c01c60ef4be85fbbb63c87b7c8f6fd7540f779537e6263ee47bb2","lane":"lint","parents":["622fa0150a5b5399fca6f70b5a9e119dcdc1b230"],"secs":26,"stamp":"94fd94970e6fe618a97da21fa028bca2","tree":"18171423214d0ff1f389335b7ecfa6dfaa2a3325","v":1,"via":"run"} Ci-Attestation: {"at":1791915462,"gate":"rust/x86_64-unknown-linux-gnu/clippy","host":"linux-x86_64","key":"a170de36a11c01c60ef4be85fbbb63c87b7c8f6fd7540f779537e6263ee47bb2","lane":"lint","parents":["622fa0150a5b5399fca6f70b5a9e119dcdc1b230"],"secs":26,"stamp":"47fb7dc0fd63778a6c47af595688bd9c","tree":"18171423214d0ff1f389335b7ecfa6dfaa2a3325","v":1,"via":"run"} Ci-Attestation: {"at":1791915462,"gate":"rust/x86_64-unknown-linux-gnu/test","host":"linux-x86_64","key":"a68a6419710723aa179271d9832becca610d83d890c16b635148e37896b4dd00","lane":"rust-test","parents":["622fa0150a5b5399fca6f70b5a9e119dcdc1b230"],"secs":80,"stamp":"26c6b571267af1df9c5fe47a801103bc","tree":"18171423214d0ff1f389335b7ecfa6dfaa2a3325","v":1,"via":"run"} Ci-Attestation: {"at":1791915462,"gate":"rust/x86_64-pc-windows-msvc/clippy","host":"linux-x86_64","key":"8907a8740d6482a11a2d098769993caa1a477d63e36066a5cc4b8f7fa4cc8764","lane":"cross","parents":["622fa0150a5b5399fca6f70b5a9e119dcdc1b230"],"secs":62,"stamp":"53ab1315bef740a3ed55ca1e69334be8","tree":"18171423214d0ff1f389335b7ecfa6dfaa2a3325","v":1,"via":"run"} Ci-Attestation: {"at":1791915462,"gate":"rust/x86_64-pc-windows-msvc/dylint","host":"linux-x86_64","key":"8907a8740d6482a11a2d098769993caa1a477d63e36066a5cc4b8f7fa4cc8764","lane":"cross","parents":["622fa0150a5b5399fca6f70b5a9e119dcdc1b230"],"secs":62,"stamp":"8d311426e90d4964c931bcfae1e81ef3","tree":"18171423214d0ff1f389335b7ecfa6dfaa2a3325","v":1,"via":"run"} Ci-Attestation: {"at":1791915462,"gate":"rust/aarch64-apple-darwin/clippy","host":"linux-x86_64","key":"8907a8740d6482a11a2d098769993caa1a477d63e36066a5cc4b8f7fa4cc8764","lane":"cross","parents":["622fa0150a5b5399fca6f70b5a9e119dcdc1b230"],"secs":62,"stamp":"43d4fb522d7319c971b6724597570f28","tree":"18171423214d0ff1f389335b7ecfa6dfaa2a3325","v":1,"via":"run"} Ci-Attestation: {"at":1791915462,"gate":"rust/aarch64-apple-darwin/dylint","host":"linux-x86_64","key":"8907a8740d6482a11a2d098769993caa1a477d63e36066a5cc4b8f7fa4cc8764","lane":"cross","parents":["622fa0150a5b5399fca6f70b5a9e119dcdc1b230"],"secs":62,"stamp":"aa343661a87b3008281e5a37b561926d","tree":"18171423214d0ff1f389335b7ecfa6dfaa2a3325","v":1,"via":"run"} Ci-Attestation: {"at":1791915462,"gate":"rust/x86_64-apple-darwin/clippy","host":"linux-x86_64","key":"8907a8740d6482a11a2d098769993caa1a477d63e36066a5cc4b8f7fa4cc8764","lane":"cross","parents":["622fa0150a5b5399fca6f70b5a9e119dcdc1b230"],"secs":62,"stamp":"7497935565e024dddba340a5d2aa00c3","tree":"18171423214d0ff1f389335b7ecfa6dfaa2a3325","v":1,"via":"run"} Ci-Attestation: {"at":1791915462,"gate":"rust/x86_64-apple-darwin/dylint","host":"linux-x86_64","key":"8907a8740d6482a11a2d098769993caa1a477d63e36066a5cc4b8f7fa4cc8764","lane":"cross","parents":["622fa0150a5b5399fca6f70b5a9e119dcdc1b230"],"secs":62,"stamp":"1a99834f286813ad454cf854cce18dd4","tree":"18171423214d0ff1f389335b7ecfa6dfaa2a3325","v":1,"via":"run"} Ci-Attestation: {"at":1791915462,"gate":"cpp/linux-x64/tier2","host":"linux-x86_64","key":"3dd1f4a787d118314f3cbeeaf0de9dedcf34351f267585947d794ea676b66a6a","lane":"tier2-linux","parents":["622fa0150a5b5399fca6f70b5a9e119dcdc1b230"],"secs":150,"stamp":"d84556bb2dee1e55ea8cf6bcd8c5a2dc","tree":"18171423214d0ff1f389335b7ecfa6dfaa2a3325","v":1,"via":"run"}
This was referenced Oct 13, 2026
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
In Studio Mode, the Audio Mixer now marks and shows as Preview the audio sources inside groups and nested scenes of the previewed scene, not only those directly in it. All three play the same way once the scene goes to Program, so the preview mixer now matches.
frontend: Move the Audio Mixer preview source walk into a helper: moves the walk inAudioMixer::updatePreviewSources()intoCollectPreviewAudioSources()(frontend/utility/preview-audio-sources.cpp, Qt Core only) so it can be tested without the mixer. No change in behaviour.test/cmocka: Audio Mixer preview misses sources in groups and nested scenes:test_preview_audio_sourcesbuilds real libobs scenes and groups with a dummy audio input (the reporter's layout) and asks the helper for the previewed scene. The cases are:3 of 5 fail today (the guards pass), the same way in every run.
frontend: Mark audio sources in groups and nested scenes as Preview: the fix, a port of Warchamp7's frontend: Mark nested audio sources as previewed obsproject/obs-studio#13759 (credited as co-author): visible groups and nested scenes are walked too. 5 of 5 pass.Motivation and Context
Fixes #602 (upstream obsproject/obs-studio#13297, reported by lperovskaya with a sample scene collection; confirmed upstream). Warchamp7's obsproject/obs-studio#13759 makes the same check recursive; it is not merged yet.
Reproduced in the current release (AppImage 33.0.0-beta6-799), headless, with a small test module that builds the reporter's layout (MUSIC: a looping Media Source; GROUP: another one inside a group; NESTED: the MUSIC scene as a source), turns Studio Mode on with an empty scene in Program and reads the mixer while previewing each scene:
Why this one: a confirmed user report with a sample collection; the mixer disagrees with what Program will play; small fix with an upstream author's design; reproduced in our release.
How Has This Been Tested?
Automated, in both libobs lanes (
ENABLE_RUST_LIBOBSOFF and ON), rebased on current master:test_preview_audio_sources: 3 of 5 cases fail at the RED commit and 5 of 5 pass at GREEN (3 runs each per lane), under a private Xvfb.ctest -Vshows all 5 cases run. Liketest_filter_clipboard, it needs a display forobs_startup()and its cases skip without one (so they skip in CI, which has no display).open_crashes_without_obs_coreskips).End to end (OBS built from this branch with the frontend, Rust libobs, headless, same test module and layout): at the refactor commit the mixer behaves exactly like the release; with the fix, previewing GROUP shows "music grouped" as Preview and previewing NESTED shows "music direct" as Preview; MUSIC is unchanged.
Not covered: the mixer refreshes the preview marks when an item of the previewed scene itself is shown or hidden; showing or hiding an item inside a group or nested scene is not watched (as before), so those marks update on the next refresh (scene change, source added or removed).
Types of changes
Checklist:
🤖 Generated with Claude Code