[Interest] Qt6 porting guidance: QSound? QAudioFormat: endian, codec?

Doris Verria doris.verria at qt.io
Mon Aug 9 12:36:30 CEST 2021


Hello,

Currently, it is not possible to request a specific format for QAudioDecoder. We plan to support this after 6.2.

QAudioDecoder now decodes to the native format used in the encoded file. That is, it will output in the same channel count, 
sample rate, sample format (the bits per sample information is sometimes irrelevant for compressed formats and therefore 
will be 0 or not known. In that case, the output format will default to 16bit signed int) as the original file.

QAudioBuffer, returned by QAudioDecoder::read(), will have the correct output format set and can be retrieved through 
QAudioBuffer::format().

Best, 
Doris

On 8.8.21, 3:46 AM, "David M. Cotter" <dave at kjams.com> wrote:

    You can still specify the channel count, sample rate, and the sample format

    where and how does one do this for QAudioDecoder?

    or does QAudioDecoder only always output one specific format? what is the format? 44100 hz, 16bit signed int, stereo? or what?

    i see no documentation that explains this, nor is there anything in the header indicating it is possible to request a specific format

    -dave




More information about the Interest mailing list