Get audio device supported sample rates in Qt6
-
I think it can be retrieved via QAudioDevice
-
I think it can be retrieved via QAudioDevice
@Christian-Ehrlicher Ah thanks. I found it, they changed the API from a list of sample rates to
minimumSampleRate()andmaximumSampleRate().Do you know if there's a way to get a list of the sample rates the device natively supports?
It looks like they made a move to support arbitrary sample rates, resampling as needed, which is fancy I guess, but for quality and performance (and also UI) it'd be nice to know what the native rates are that don't get munged by the resampler.
Also it seems like the min/max might not be correct. I know for example that one of my devices natively supports 8kHz, and Qt5 also reported that in the list, but Qt6 reports 11.25kHz as the minimum sample rate.
-
Sorry I don't have muich knowledge about QMultimedia. Maybe step in to the Qt sources to see why a wrong sample rate is returned and then open a bug report about it.