Skip to content

test: Characterize and extract obs_set_audio_monitoring_device and obs_reset_audio_monitoring before Rust swap #5489

Closed

Description

@rdoupe

C-only prerequisite for the Phase 6 libobs core migration (#444), the next core entry points after obs_reset_audio2 (#5484, swap in #5486): characterize obs_set_audio_monitoring_device and obs_reset_audio_monitoring (libobs/obs.c.h, with their static helper check_all_aoc_sources), then move them verbatim into one new libobs/obs-*.c.h file registered alphabetically in the core unity group.

Existing tests already pin the NULL/empty refusals and the return value per availability (test_core_setup_rules_steps, test_monitoring_device), and the per-monitor reset on PulseAudio with interposed libpulse (test_pulse_monitor_reset). A new test pins what is left, on the same interposed libpulse so monitoring is available without a sound server:

  • a new device is stored by copy (obs_get_audio_monitoring_device reads back the name and id, not the caller's storage) and every live monitor is reset once;
  • the same id again returns true, keeps the old name, and resets nothing;
  • an Audio Output Capture source (OBS_SOURCE_DO_NOT_SELF_MONITOR) is told about the change with its own device_id setting, other sources are not;
  • obs_reset_audio_monitoring with no monitors is a no-op, and resets each live monitor once.

Preserve existing C tests and public headers. No behavior change; the Rust swap is a separate follow-up.

Activity

  1. added
    port
    on Nov 23, 2026
  2. rdoupe commented on Nov 23, 2026

    @rdoupe
    CollaboratorAuthor

    /ready

  3. added
    ready
    on Nov 23, 2026
  4. rdoupe commented on Nov 23, 2026

    @rdoupe
    CollaboratorAuthor

    Claiming: characterization of obs_set_audio_monitoring_device and obs_reset_audio_monitoring, and their verbatim extraction into one libobs/obs-*.c.h in the core group, same shape as obs_reset_audio2 (#5485). Branch: test/audio-monitoring-device-extract. Plan: new cmocka test on interposed libpulse (the test_pulse_monitor_reset shape), RED-free characterization commit first against the C in obs.c.h, then the move; Tier 2 on hybrid and the C reference, plus a mutation check.

  5. rdoupe commented on Nov 23, 2026

    @rdoupe
    CollaboratorAuthor

    The characterization and verbatim extraction are up in #5490: Tier 2 1086/1086 on hybrid and the C reference, all five cases run on both, and a mutant that drops the source's device_id from the Audio Output Capture notification fails only the case that pins it.

  6. rdoupe commented on Nov 23, 2026

    @rdoupe
    CollaboratorAuthor

    Done in #5490.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

portready

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions