Issue with QAudioDecoder
-
Hello,
I am looking at the example given to decode some audio data :
QAudioFormat desiredFormat;
desiredFormat.setChannelCount(2);
desiredFormat.setCodec("audio/x-raw");
desiredFormat.setSampleType(QAudioFormat::UnSignedInt);
desiredFormat.setSampleRate(48000);
desiredFormat.setSampleSize(16);QAudioDecoder *decoder = new QAudioDecoder(this);
decoder->setAudioFormat(desiredFormat);
decoder->setSourceFilename("level1.mp3");connect(decoder, SIGNAL(bufferReady()), this, SLOT(readBuffer()));
decoder->start();The issue I have here is to be obliged to create a QAudioFormat before decoding the audio file. Indeed, it means that you already know some information (sample rate, etc ...) about the audio file you are about to decode which is rarely the case.
Is there for example a way to decode (extract the data) of a wav file without knowing these informations such as sample rate ...,?Thanks for your help.
Cheers,
-
Does someone have any idea please? :)
Thank you very much -
Still not? :)
-
Hi,
You should add which OS/Qt version you are using
-
Hello,
Qt 5.1 on windows.
Cheers,
-
Did you check the "bug report system":https://bugreports.qt-project.org/ to see if this is something known ? You might consider creating a bug report (put as much details as you can and a minimal compilable example so it can be reproduced)
You can also start by asking on the interest mailing list, You'll find Qt's developers/maintainers there (this forum is more user oriented)