From 48b6f9030288085e463aa65a82026361dc18289a Mon Sep 17 00:00:00 2001 From: Alexander Yee Date: Wed, 28 Oct 2026 09:46:42 -0700 Subject: [PATCH 1/2] Always show interleaved if 1x96k is available. --- .../CommonFramework/AudioPipeline/AudioInfo.cpp | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/SerialPrograms/Source/CommonFramework/AudioPipeline/AudioInfo.cpp b/SerialPrograms/Source/CommonFramework/AudioPipeline/AudioInfo.cpp index e046fed4d3..27c3e51c6e 100644 --- a/SerialPrograms/Source/CommonFramework/AudioPipeline/AudioInfo.cpp +++ b/SerialPrograms/Source/CommonFramework/AudioPipeline/AudioInfo.cpp @@ -336,18 +336,15 @@ AudioInputChoiceList input_choices(std::vector supported, const Aud return x.channelConfig() < y.channelConfig(); }); + // 4. The misreporting capture-card case: 1ch x 96000, which is + // physically two 48 kHz channels interleaved. + // Offer the reinterpretations in addition to the native choice. for (const AudioFormat& format : deduped){ ret.choices.emplace_back(format); - } - - // 4. The misreporting capture-card case: the only supported format is - // 1ch x 96000, which is physically two 48 kHz channels interleaved. - // Offer the reinterpretations in addition to the native choice. - if (ret.choices.size() == 1){ - const QAudioFormat& only = ret.choices[0].format().native_format(); + const QAudioFormat& only = format.native_format(); if (only.channelCount() == 1 && only.sampleRate() == 96000){ - ret.choices.emplace_back(reinterpreted_96k_choice(ret.choices[0].format(), false)); - ret.choices.emplace_back(reinterpreted_96k_choice(ret.choices[0].format(), true)); + ret.choices.emplace_back(reinterpreted_96k_choice(format, false)); + ret.choices.emplace_back(reinterpreted_96k_choice(format, true)); } } From 387306b635833719d2fa1fa360d418254b1f28ab Mon Sep 17 00:00:00 2001 From: Alexander Yee Date: Wed, 28 Oct 2026 09:59:39 -0700 Subject: [PATCH 2/2] fix text --- .../CommonFramework/AudioPipeline/AudioInfo_Tests.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/SerialPrograms/Source/CommonFramework/AudioPipeline/AudioInfo_Tests.cpp b/SerialPrograms/Source/CommonFramework/AudioPipeline/AudioInfo_Tests.cpp index 0608b1a7f6..353444aaec 100644 --- a/SerialPrograms/Source/CommonFramework/AudioPipeline/AudioInfo_Tests.cpp +++ b/SerialPrograms/Source/CommonFramework/AudioPipeline/AudioInfo_Tests.cpp @@ -339,12 +339,9 @@ class InputChoicesCardQuirkTest : public UnitTest{ AudioInputChoiceList mixed = input_choices( {card, make_format(48000, 2, QAudioFormat::ChannelConfig::ChannelConfigStereo)}, card ); - if (mixed.choices.size() != 2 - || mixed.choices[0].is_reinterpreted() || mixed.choices[1].is_reinterpreted()){ - return "A device with other formats should not get reinterpretation entries."; - } - if (mixed.choices[0].display_name() != "2 x 48,000 Hz (Stereo)" - || mixed.choices[1].display_name() != "1 x 96,000 Hz (Mono)"){ + if (mixed.choices[0].display_name() != "2 x 48,000 Hz (Stereo)" || + mixed.choices[1].display_name() != "1 x 96,000 Hz (Mono)" + ){ return "Mixed device should list the native entries sorted by channel count desc, then sample rate desc."; }