I found the answer.
QAudioOutput *audioOutput = new QAudioOutput(myAudioFormat, this);
qDebug() << "Parent is" << ioDevice->parent();
QAudioOutput *audioOutput = new QAudioOutput(myAudioFormat, this);
QIODevice *ioDevice = audioOutput->start();
qDebug() << "Parent is" << ioDevice->parent();
To copy to clipboard, switch view to plain text mode
...gives the following:
So nobody owns the QIODevice, so it has to be manually deleted.
EDIT: Nope, I was mistaken... even though nobody owns the QIODevice, it still gets automatically deleted when QAudioOutput::stop() is called.
Bookmarks