Skip to content

rust: Port the PulseAudio monitor steps in pulseaudio-output.c to Rust #2470

Closed

Description

@rdoupe

Rust port, round 9 unit 10: the PulseAudio monitor open and write steps in libobs/audio-monitoring/pulse/pulseaudio-output.c.h, moved to Rust next to the format and channel choices that are already ported.

Scope

Rust takes over these decisions:

  • do_stream_write: when to grow the server buffer (queue past twice tlength) and the attributes it writes, staying corked until a whole tlength is queued, and the write loop's stop rule;
  • on_audio_playback: skip a source with no activate refs, apply volume only when it is not 1 within EPSILON, and the bytes pushed;
  • pulseaudio_sink_info: the error and end-of-list results;
  • audio_monitor_init: no device id, the self-monitor feedback check, default or the named device, the fallback to the default sink when the chosen one is gone, the invalid-format refusal, and the 25 ms tlength;
  • on_sink_event: only new and remove events are queued;
  • audio_monitor_reset: replace, keep, or turn into an ignoring monitor;
  • audio_monitor_destroy: stop sink events when the last monitor goes.

C keeps the PulseAudio lock, playback_mutex (the trylock in the capture callback), the monitoring mutex, every pa_* call, the server and sink info queries, get_default_id, devices_match, the settings read, the resampler and the deque.

Plan

The standard six commits:

  1. move;
  2. characterization test;
  3. Tier 1 RED;
  4. GREEN in a libobs.ported-* group;
  5. Tier 3 parity;
  6. docs.

Activity

  1. added
    ready
    on Oct 26, 2026
  2. rdoupe commented on Oct 26, 2026

    @rdoupe
    CollaboratorAuthor

    Claiming: #2470 (round 9 unit 10, PulseAudio monitor steps).

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

Metadata

Metadata

Assignees

Labels

ready

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions