1 | initial version |
Qt5 and Qt6 have different ways of handling audio devices. Qt5 audio devices (QAudioDeviceInfo), when querying, give a short list of all the hardware supported sample rates. Qt5 does not itself support resampling. To play audio, the device is queried for the list of hardware sample rates, and then Wireshark must resample it before sending it to the output.
Qt6 (QAudioDevice), unlike Qt5, supports resampling. There is no function to retrieve the hardware supported audio sample rates. You can retrieve the minimum or maximum supported sample rates, or query if a particular rate is supported, but Qt6 will attempt to support any particular rate you give it by resampling as necessary.
The current workaround is to query for a small list of commonly supported sample rates, and list the ones that are supported. It's theoretically possible that some of those are being resampled twice, once from the Wireshark resampler (from SpeexDSP) and once by Qt6. Perhaps in the long run, when Qt5 support is completely dropped, Wireshark will not perform resampling and simply rely on Qt6's implementation.