Porting QAudioDevice to QT6.2
Solved
General and Desktop
-
I tried to build my app with QT6.2 and all the code compiled except the code that uses
QAudioDevice
- There are no signals anymore:
connect(&audioOutput, &QAudioOutput::notify, this, &MyClass::onNotify, Qt::DirectConnection); connect(&audioOutput, &QAudioOutput::stateChanged, this, &MyClass::onStateChanged, Qt::DirectConnection);
- And there are no start/stop methods:
audioOutput.start(pDevice); audioOutput.stop();
In my code I create
QAudioOutput
andQIODevice
by opening a file, callaudioOutput.start(pDevice)
and handle the signals to loop the sound.What is the right way to make this work with QT6.2?
How to play multiple sounds at a time?
Are there some examples?
See an example working with QT5 for more information.
-
Hi,
I think you are looking for QAudioSink.