Skip to content

libobs: Characterize and extract obs_remove_raw_audio_callback before Rust #4715

Closed

Description

@zackees

The public obs_remove_raw_audio_callback wrapper remains inline at libobs/obs.c.h:3310-3314 on master f412956. This is the characterization and behavior-neutral extraction prerequisite required by testing-policy.md:189-235, before a separate Phase 6 Rust swap in obs-core.

Add a new C characterization calling the real exported APIs against both hybrid libobs and libobs-c-reference. Pin matching mix/callback/parameter removal, unknown and repeated removal, isolation of the other registered callbacks and mixes, full size_t invalid indices, and delegation to the initialized core's main audio output. Observe registration synchronously through audio_output_connect's duplicate rejection, without frame counts, sleeps or deferred source destruction (#4680). Include the initialized-core/no-audio case.

Run the characterization before and after moving the complete definition verbatim into libobs/obs-raw-audio-remove.c.h, with its sole core PCH include and alphabetically sorted core unity registration per BUILD.md. The only callee is the existing extern audio_output_disconnect; there is no private static helper or new seam. Do not change existing C tests, public headers, workflows, plugins/obs-websocket or test-graph.json. Keep the function's initialized-core precondition and downstream behavior unchanged.

Exact-function open PR/issue searches and merged PR search found no competing work. The neighboring obs_set_output_source extraction (#4708, branch test/4708-set-output-source-extract) is separate; this work touches a disjoint body and distinct test/source files.

The Rust swap is tracked separately in #4716, after this prerequisite lands.

Activity

  1. added
    enhancement
    port
    ready
    P2
    size:S
    on Nov 11, 2026
  2. zackees commented on Nov 11, 2026

    @zackees
    MemberAuthor

    Claiming: characterization and verbatim extraction of obs_remove_raw_audio_callback in slot obs-studio2, branch test/4715-raw-audio-remove-extract.

    1. Add deterministic C characterization against the actual hybrid and C-reference libraries, and commit/run it before extraction.
    2. Extract the complete body verbatim with sorted unity registration, and rerun the same tests against both libraries.
    3. File the separate Rust swap follow-up, run focused validation and full lint once, then publish according to backpressure. Expected first publish this session; this claim does not cover obs_add_raw_audio_callback or test: Characterize and extract obs_set_output_source before Rust swap #4708.
  3. zackees commented on Nov 12, 2026

    @zackees
    MemberAuthor

    Completed by #4727, merge commit 4598d179e6dd65b1fca8729ed7f027bceea02419. Verified it is an ancestor of origin/master (1273c7ea21c9c6fae1ba7bb3ba7425429dfebc56).

    Verified obs_remove_raw_audio_callback was extracted verbatim into libobs/obs-raw-audio-remove.c.h with the core PCH and sorted core-unity registration. The body remains byte-identical to its pre-merge original. test_raw_audio_remove.c and its independent tests.d registration exist unchanged: they cover mix/callback/parameter identity, unknown/repeated removals, isolation, full-size invalid indices, initialized-core/no-audio and actual main-output delegation. The merged PR records before/after actual hybrid/reference replays and matching exports. This prerequisite's full scope is delivered; the separate Rust swap remains #4716. Closing as completed.

  4. moved this from In progress to Done in obs-rust Multiviewon Nov 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P2enhancementportreadysize:S

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions