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 push-to-mute/talk gate in obs-source.c to obs-source #2066
Port the push-to-mute/push-to-talk gate in libobs/obs-source.c.hsource_muted() to rust/obs-source as a new module ptm_gate. The decisions are the stop-time update while a key is held, which since #2058 goes through the saturating push_to_stop_time(), and the muted result from enabled, user_muted and the two gates. The second stop-time use in get_source_volume() uses the same helper, so it moves too.
The caller source_output_audio_data and the hotkey state stay in C. C passes in the flags, delays, stop times and os_time, and writes back the two stop times.
Plan (one PR, separate commits)
A behaviour-neutral move into libobs/obs-source-ptm-gate.c.h, as hidden functions.
Characterization test_source_ptm_gate_steps. It covers each flag; a key release inside and after the delay; a delay of 0; and delays and sums at the saturation edge.
RED, then GREEN: the safe Rust core plus shims in a libobs.ported-source-ptm-gate group. The exported symbols are unchanged.
Tier 3 parity against the original C, exhaustive over the flags, plus a proptest over full-range u64 times and delays. Then a deliberate-break check and port_comparison numbers.
test_source_audio_ranges (#2058) and the hotkey audio tests must stay green on every lane.
Activity
rdoupe commentedon Oct 24, 2026
Claiming: #2066.
obs-source: Port the push-to-mute/talk gate (obs-rust#2089)