Skip to content

rust: Port libobs/obs-raw-audio-add.c.h to obs-core #5511

Closed

Description

@rdoupe

Unit

libobs/obs-raw-audio-add.c.h (obs_add_raw_audio_callback) to obs-core.

Phase and position

Phase 6 libobs core (#444). The counterpart of obs_remove_raw_audio_callback, already in Rust (#4716, PR #5003).

Dependencies and existing tests

The extraction and characterization landed in #5505 (issue #5502): the function sits alone in libobs/obs-raw-audio-add.c.h, and test/cmocka/test_raw_audio_add.c pins it against both hybrid libobs and libobs-c-reference. The only callees are the public obs_get_audio getter (already a Rust export; it returns obs->audio.audio, the field the C reads) and media-io's audio_output_connect. No private helper, so no new seam.

Notes

Preserve the initialized-core precondition, the full size_t mix index, the conversion pointer, the callback/parameter identity, and exactly one call to audio_output_connect on the main core audio output, with its return value ignored, also when the core has no audio output (NULL). No validation, locking or fallback. Tier 1: every test_raw_audio_add case in the Core state binary. Tier 2: the unchanged cmocka test against both libraries. Tier 3: the renamed original C against the Rust bridge with one connect recorder (arguments, call count, registration state), plus real-header layout checks of the boundary types. Tier 4 does not apply. No public header or existing C test changes. Its own ported group and export fragment, symbol parity kept.

Activity

  1. added
    enhancement
    port
    P2
    size:S
    on Nov 23, 2026
  2. rdoupe commented on Nov 23, 2026

    @rdoupe
    CollaboratorAuthor

    /ready

  3. rdoupe commented on Nov 23, 2026

    @rdoupe
    CollaboratorAuthor

    Claiming: the obs_add_raw_audio_callback Rust swap.

    1. RED: obs-core stub (todo!()) with the Tier 1 cases of test_raw_audio_add and the original-C Tier 3 parity test.
    2. GREEN: the port, its ported unity group and export fragment, README row.
      One PR, expected this session.
  4. added
    ready
    on Nov 23, 2026
  5. rdoupe commented on Nov 23, 2026

    @rdoupe
    CollaboratorAuthor

    PR: #5512. RED 0/8 on the stub, GREEN 8/8, Tier 2 1089/1089 on both libraries.

  6. added a commit that references this issue on Nov 29, 2026
    a868903
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