You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
rust: Port the scene audio render window in obs-scene.c to obs-scene #2178
Port the scene audio render window decisions in scene_audio_render() (libobs/obs-scene.c.h) to rust/obs-scene, as a new module audio_window. These decisions move:
Which source to read per item. The show transition while it plays for a visible item, the hide transition for a hidden one, and the source otherwise.
The earliest timestamp. Taken over items that are not pending and are visible or hiding.
The no-audio case. With no such item, process every item's pending actions and report no audio.
The window for each item.
Skip it if it is pending or has no timestamp.
Otherwise compute pos from ns_to_audio_frames, and skip at pos >= AUDIO_OUTPUT_FRAMES.
Compute count.
Skip a hidden item that has no volume buffer and no hide transition.
Skip duplicated audio.
These stay in C:
audio_lock;
apply_scene_item_volume and process_all_audio_actions, which are already ported; C calls them and passes the result;
obs_source_get_audio_mix;
the two mix loops.
Plan (one PR, separate commits)
A behaviour-neutral move into libobs/obs-scene-audio-window.c.h, as hidden functions.
Characterization in test_scene_audio_window_steps. It covers:
every pick for each combination of visible and active transition;
the minimum over item sets, including all pending and no timestamps;
the item window at pos = AUDIO_OUTPUT_FRAMES - 1, at it and + 1;
a timestamp before the minimum, and the u64 edges;
every skip rule.
RED, then GREEN: the safe Rust core plus shims, in a libobs.ported-scene-audio-window group. Exported symbols are unchanged.
Tier 3 parity against the original C:
exhaustive over the flags;
a proptest over full-range timestamps and sample rates;
a deliberate-break check and port_comparison numbers.
These real-libobs tests must stay green on every lane:
Activity
rdoupe commentedon Oct 24, 2026
Claiming: #2178.
libobs: Move the scene audio render window decisions out
test: Characterize the scene audio render window decisions
obs-scene: Add the scene audio render window tests
obs-scene: Port the scene audio render window decisions
obs-scene: Check the scene audio render window port against the C
docs: Record the scene audio render window port
libobs: Move the scene audio render window decisions out
test: Characterize the scene audio render window decisions
obs-scene: Add the scene audio render window tests
obs-scene: Port the scene audio render window decisions
obs-scene: Check the scene audio render window port against the C
docs: Record the scene audio render window port
libobs: Move the scene audio render window decisions out
test: Characterize the scene audio render window decisions
obs-scene: Add the scene audio render window tests
obs-scene: Port the scene audio render window decisions
obs-scene: Check the scene audio render window port against the C
docs: Record the scene audio render window port
obs-scene: Port the scene audio render window decisions (obs-rust#2191)