Repository navigation
Say the --audio-format pin missed the advertisement, not the device - #38
Merged
chrisuthe merged 1 commit intoAug 28, 2026
Merged
Conversation
A pin the advertised list does not carry was reported as a format the output device does not take. The device often takes it: advertised_channels() collapses the channels axis to a single count -- 2 where the device lists it, its narrowest otherwise -- so a mono or multichannel pin misses pin_preferred_format() on any device that also takes stereo, and the refusal blamed the device for a narrowing this player did. The advice compounded it. -l prints the device's own channel list, so an operator who followed it was shown a set that confirmed their pin and told the opposite. Reword the refusal to assert only what was checked -- membership in the advertisement -- and keep the -l pointer with the distinction spelled out. The refusal itself is unchanged: refusing rather than playing something else is what the flag is for. advertised_channels(), supported_formats(), pin_preferred_format() and the preference ladders are untouched. The same claim appears in --help, the packaged conf example, the README, the Configuration wiki page, ROADMAP item 24, and the doc-comments that own the flag in cli.h and supported_formats.h. Correct each.
chrisuthe
marked this pull request as ready for review
August 28, 2026 13:28
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #37.
--audio-formatrefused a pin the advertised list does not carry with a messagethat blamed the output device:
The device takes it.
advertised_channels()collapses the channels axis to asingle count — 2 where the device lists it, its narrowest otherwise — while rate
and depth are crossed across everything reported. So the advertisement carries one
channel count and only one, and any pin naming another misses
pin_preferred_format()whether or not the device reports that width.The advice compounded it:
-lprints the device's own channel list, so an operatorwho followed it was shown
channels: 1 2— a set that confirms their pin — and toldthe opposite.
Reproduces with no hardware, on
null,stdout,pulseandpipewire(all reportSinkCapabilities::permissive()), and on ALSA or PortAudio devices that cannot beprobed.
What this does
Rewords the refusal to assert only what was actually checked — membership in the
advertisement — and keeps the
-lpointer with the distinction spelled out:"Not the same set" rather than "a wider set", deliberately. The advertisement is
not simply a subset of what
-lshows: a device reporting only stereo yieldsidentical sets; the permissive-fallback path (device reported nothing emittable)
advertises more than
-lprints; and Opus is only ever advertised at48 kHz / 16-bit / ≤2ch whatever the device reports.
No behaviour change.
advertised_channels(),supported_formats(),pin_preferred_format()and the preference ladders are untouched, and theAdvertising N formats …line is byte-identical. The refusal stays — refusingrather than playing something else is the whole point of the flag.
The same wrong claim appeared in six other places, all corrected: the
--helptext, the packaged conf example,
README.md,docs/wiki/Configuration.md,ROADMAP item 24 (both bullets — the second still said "startup-time device
validation"), and the doc-comments that own the flag in
src/cli.handsrc/supported_formats.h. The README also now states that the advertisementcarries a single channel count, so a reader whose mono pin was just refused can
work out why.
Left alone on purpose: the runtime refusal in
src/player_listener.cpp, where thedevice genuinely did refuse, so "what the device accepts" is true there.
Verification
Still starts on a pin the advertisement carries:
A pin outside the probed axes is refused by the same message (
flac:11025:16:2,exit 1) — the rate-miss and channel-miss cases share one path.
ctest: 401/401 pass, with no new or changed test expectations.clang-formatclean over every changed region.
Not in scope
Whether the channels narrowing itself should go — advertising every count the
device reported — is a behaviour change with its own argument and is deliberately
not made here. It is worth its own issue if a mono or multichannel pin should ever
work. Note that
advertised_channels()'s rationale argues against promising awidth the device cannot take, which says nothing about why the narrower widths it
can take are dropped.