Skip to content

Audio mixer: an output whose consumer ends silences its channels on Main #933

Open

Description

@wagenet

Opened by Claude (AI) on Peter Wagenet's behalf.

A mixer output whose consumer ends silences that channel on Main

If whatever is linked to one of the audio mixer's outputs reaches end-of-stream while the flow keeps running, the channels feeding that output go silent on Main. Nothing is posted to the bus, so the operator sees a channel stop on air with no cause. A consumer torn down mid-flow (FLUSHING) should take the same path; that is read from the code, not measured.

Mechanism (from reading GStreamer's tee and queue). A tee with allow-not-linked tolerates NOT_LINKED only and returns any other non-OK result to the thread that pushed into it.

  • On a direct out (feat(mixer): add per-channel direct outputs #930) the channel's thread pushes into direct_tee → queue → consumer. Once the consumer returns EOS, the queue returns EOS on the next push, and the channel's source stops.
  • On an aux out the consumer stops the aux bus. The per-channel queues into that bus then fill (1 s), and the channel's tee blocks, which stops the channel on Main as well.

Measured (in-process, a tone on channel 1; a consumer sends EOS while the flow runs):

Output Channel on Main after the consumer ends
Aux out (upstream/main) silent about 1 s later, once the aux queue fills
Direct out (#930) silent at once

Bus errors and warnings: 0 in both cases.

Possible directions:

  • Contain non-OK returns on output branches, so one consumer cannot stop a channel. This needs code on the per-buffer path, for example a probe or a small element that turns EOS/FLUSHING into OK for that branch.
  • At least make it visible: a warning naming the block and output, or a block-health state. An element error would stop the whole flow, which is worse than the current failure.

This affects every mixer output with a per-output queue, not only #930's direct outs, so it is filed separately.

🤖 Generated with Claude Code

Activity

  1. srperens commented on Oct 21, 2026

    @srperens
    Collaborator

    Area: Audio mixer, output branch isolation

    About: When the consumer of one mixer output ends, the channels feeding that output stop on Main too, with nothing on the bus. On aux outs the per-send queues (defaults, ~1 s) fill and block the channel's routing tee. On #930's direct outs the EOS returns to the channel at once.

    Relates to: #930 (direct outs, where it is immediate), merged #1008 (guards the per-send queues for a slow bus; a dead bus is the case left), #926 (one output's consumer silencing another), #898 (the reverse: an ended input's EOS on a bus), merged #757 (prior art, below).

    Thoughts: The Recorder already contains its own ended track: a probe at its input drops buffers and events with one atomic load, so its EOS never reaches upstream. The same on the mixer's output side would cover every consumer. Not verified here: whether a torn-down consumer (FLUSHING) takes the same path.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions