[Interest] Qt6 mac and windows: QAudioDecoder + mp3?

David M. Cotter dave at kjams.com
Sat Jul 24 04:44:45 CEST 2021


i can find no "Multimedia Backends" wiki page for either 5.15.2 or 6.2.0.

what i can find is this:
https://wiki.qt.io/Qt_Multimedia_Backends

it is out of date, because the latest info there is for 5.11.

now, in 5.11 it makes it clear that QAudioDecoder simply isn't implemented for mac.
but that it IS in fact implemented on windows.

so, decoding MP3 on windows should work, right?

on this page:
https://www.qt.io/blog/qt-multimedia-in-qt-6

it says "Qt 6 also has cross platform support for decoding audio files into raw PCM data using the QAudioDecoder class"

which means decoding in qt6 should work on mac too, right?

well, two problems:

1: qt6 on mac: it won't decode mp3, says this error: "Unsupported Source Format"
note that it doesn't EMIT that error, or at least, i'm unable to get my error() slot invoked, i have to poll for that error in my pull-audio-frames callback. filed a bug on that <https://bugreports.qt.io/browse/QTBUG-95352> already. in fact no other signals, including error, are ever sent.

you can't actually link against qt6 on windows yet, due to yet another bug <https://bugreports.qt.io/browse/QTBUG-95290>, so i can't test that.

2: qt5 on windows: it won't decode mp3, the "handle_bufferReady()" slot is never called (yes it is correctly hooked up). in fact no other signals, including error, are ever sent.

are these two issues KNOWN? or are they unexpected?

is there any sample code for audio extraction, and i don't mean sending it to an audio-out device, i mean faster than realtime audio extraction?

for both mac and windows?

note all this is happening on a background boost::thread. could that be related?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20210723/33389978/attachment.html>


More information about the Interest mailing list