Repository navigation
Make the audio input state and UI choice-driven (Step C) - #1711
Merged
Merged
Conversation
Move the remaining preset (AudioChannelFormat) consumers onto the device-driven AudioInputChoice introduced in Steps A/B: - AudioSession: input_format()/set_format() become input_choice()/ set_input_choice(); sanitize_format() becomes sanitize_choice() (validates the stored choice against the device's supported_choices()); the post_input_change state callback now carries the choice. - AudioPassthroughPair (+ Qt / QtThread backends): reset() and set_audio_source(device) take the resolved AudioInputChoice instead of the preset; the pair no longer resolves presets itself. - AudioOption: persists the choice's display name (JSON key unchanged); load matches it against the device's supported choices. - AudioSelectorWidget: the format dropdown is built from supported_choices() and its display names instead of supported_formats()/AUDIO_FORMAT_LABELS. - StreamHistorySession: start()/post_input_change() take the choice. - AudioInputChoice gains operator== (validity-guarded) and user-provided copy ctor / assignment / destructor, defined in AudioInfo.cpp, so TUs passing choices by value never instantiate Pimpl<QAudioFormat> themselves (AudioSession.cpp no longer needs Pimpl.tpp at all). - resolve_input_choice() (the Step B preset->choice bridge) and its test are removed now that nothing resolves presets; replaced by an AudioInputChoice equality gate test. Behavior notes: - A saved config's format entry that names a native shape still matches (labels and choice display names coincide); a saved INTERLEAVE entry (old physical-shape label) falls back to the device's preferred choice. - File input clears the format dropdown as before; the pipeline still consumes the file's native shape.
Mysticial
force-pushed
the
step-c-choice-ui
branch
from
October 24, 2026 22:20
d68a86b to
8e50618
Compare
Mysticial
pushed a commit
that referenced
this pull request
Oct 24, 2026
Deletes the last of the fixed input-format preset machinery, now that the pipeline, session state, options/JSON, and UI all run on the device-driven AudioInputChoice (Steps A-C, #1678 / #1707 / #1711): - AudioChannelFormat enum, AUDIO_FORMAT_LABELS, and set_format(). - AudioDeviceInfo::supported_formats() / preferred_format_index() and the dead preferred_format(); the legacy supported_input_formats() grid-to- preset mapping (its #if 0 debug remnants included). - all_input_devices(): the same-display-name dedupe now scores on the number of input choices instead of the legacy format list (+ the preferred-preset-match bonus, which has no choice-world analogue); the winMM shadow-device comment notes QTBUG-75781 is a Qt5-era artifact that no longer occurs on Qt6. - Stale comments in AudioInfo_Tests and StreamHistorySession::clear(). The shared enumerate_supported_formats() grid probe stays: it feeds build_input_choices(). format_to_str() stays: it is still used to log output device preferred formats. Co-authored-by: PA Dev Bot <344001113+pa-devbot@users.noreply.github.com>
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.
Continues the audio pipeline redesign after Step B (#1707): the remaining
AudioChannelFormatpreset consumers now run on the device-drivenAudioInputChoice.What changes
input_format()/set_format()becomeinput_choice()/set_input_choice();sanitize_format()becomessanitize_choice(), validating the stored choice against the device'ssupported_choices(); thepost_input_changestate callback carries the choice.reset()andset_audio_source(device)take the resolved choice; the pair no longer resolves presets itself (the session guarantees validity).InputFormatJSON key; loading matches it against the device's choices.supported_choices()+ display names (replacessupported_formats()/AUDIO_FORMAT_LABELS).start()/post_input_change()take the choice.operator==(validity-guarded) and user-provided copy ctor / assignment / destructor defined inAudioInfo.cpp, so TUs passing choices by value never instantiatePimpl<QAudioFormat>themselves —AudioSession.cppno longer includesPimpl.tppat all (the Step B CI link fix stays structurally sound on clang+ld.bfd;nmshows no object with an undefined Pimpl reference).resolve_input_choice()(the Step B preset→choice bridge, now dead) and its test; adds anAudioInputChoiceequality gate test.Behavior notes
preferred_choice_index(), same as the preset fallback.Test
Full suite: 18,277 passed / 0 failed / 0 skipped (3 decode tests included via pinned ffmpeg backend).